apache/superset · error · ExtensionNameError

Extension name cannot be empty

Error message

Extension name cannot be empty

What it means

Thrown by validate_technical_name() in the superset-extensions CLI when the technical extension name is empty (falsy). The technical name is the slug part of '<publisher>/<name>' used for directories, package names, and module federation identifiers, so an empty value cannot be accepted. This is the first of two guards in the function; the second checks the format regex.

Source

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

    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:
        raise ExtensionNameError("Extension name cannot be empty")

    if not TECHNICAL_NAME_REGEX.match(name):
        raise ExtensionNameError(
            "Extension name must start with a letter and contain only lowercase letters, numbers, and hyphens (e.g., 'dashboard-widgets')"
        )


def validate_display_name(display_name: str) -> str:
    """
    Validate and normalize display name format.

    Args:
        display_name: Human-readable extension name

    Returns:
        Cleaned display name

    Raises:

View on GitHub (pinned to f4587218dd)

Solutions

  1. Supply a non-empty technical name slug, e.g. 'dashboard-widgets'.
  2. Check the argument order of your CLI invocation — an empty name usually means a missing/shifted positional argument.
  3. In automation, add a guard that fails early with your own message when the name variable is empty.

Example fix

# before
NAME=""
superset-extensions create my-org "$NAME"

# after
NAME="dashboard-widgets"
superset-extensions create my-org "$NAME"
Defensive patterns

Strategy: validation

Validate before calling

name = name or ""
if not name.strip():
    raise SystemExit("extension name is required (kebab-case slug, e.g. 'dashboard-widgets')")

Prevention

When it happens

Trigger: Calling a scaffolding command with an empty string for the extension name (e.g. `create my-org ""`), passing a name composed only of whitespace (before regex validation, since only truthiness is checked here), or a script that builds the name from a variable that ended up empty.

Common situations: Shell scripts that pass "$EXTENSION_NAME" when the env var was never exported; CI templates with a placeholder that was never filled in; typos where the publisher argument is duplicated and the name argument is omitted so argparse receives ''.

Related errors


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