apache/superset · error · ExtensionNameError

Publisher cannot be empty

Error message

Publisher cannot be empty

What it means

validate_publisher is the first check in publisher-namespace validation for the extensions CLI: an empty publisher string is rejected outright ('Publisher cannot be empty'). The publisher namespace (e.g. 'my-org') scopes extension package names, so it must be non-empty before the regex format check runs.

Source

Thrown at superset-extensions-cli/src/superset_extensions_cli/utils.py:230

    Raises:
        ExtensionNameError: If name is invalid
    """
    if name.lower() in NPM_RESERVED:
        raise ExtensionNameError(f"'{name}' is a reserved npm package name")


def validate_publisher(publisher: str) -> None:
    """
    Validate publisher namespace format.

    Args:
        publisher: Publisher namespace (e.g., 'my-org')

    Raises:
        ExtensionNameError: If publisher is invalid
    """
    if not publisher:
        raise ExtensionNameError("Publisher cannot be empty")

    if not PUBLISHER_REGEX.match(publisher):
        raise ExtensionNameError(
            "Publisher must start with a letter and contain only lowercase letters, numbers, and hyphens (e.g., 'my-org')"
        )


def validate_technical_name(name: str) -> None:
    """
    Validate technical extension name format.

    Args:
        name: Technical extension name (e.g., 'dashboard-widgets')

    Raises:
        ExtensionNameError: If name is invalid
    """
    if not name:

View on GitHub (pinned to f4587218dd)

Solutions

  1. Supply a non-empty publisher namespace, e.g. --publisher my-org.
  2. Fix the automation: default the publisher variable and fail fast when it is unset (e.g. : "${PUBLISHER:?publisher required}").
  3. Follow the format rule too: starts with a letter, lowercase letters/digits/hyphens only.

Example fix

# before
$ superset-extension new my-ext --publisher ""
# after
$ superset-extension new my-ext --publisher my-org
Defensive patterns

Strategy: validation

Validate before calling

def publisher_is_valid(publisher: str) -> bool:
    return bool(publisher)  # plus: publisher[0].isalpha() and rest is [a-z0-9-]

Try / catch

try:
    validate_publisher(publisher)
except ExtensionNameError as e:
    print(f'Fix --publisher: {e}')
    sys.exit(2)

Prevention

When it happens

Trigger: Running an extensions CLI command that takes --publisher with an empty value (empty flag argument or empty environment/config value feeding it).

Common situations: Scripts passing "${PUBLISHER}" when the variable is unset; CI config with a blank publisher field; interactive prompt skipped/emptied.

Related errors


AI-assisted analysis of apache/superset@f4587218dd (2026-08-14). Data as JSON: /api/errors/21ade8959766e932. Report an issue: GitHub.