apache/superset · error · ExtensionNameError
Extension name must start with a letter and contain only low
Error message
Extension name must start with a letter and contain only lowercase letters, numbers, and hyphens (e.g., 'dashboard-widgets')
What it means
Thrown by validate_technical_name() when the name is non-empty but fails TECHNICAL_NAME_REGEX: it must start with a letter and contain only lowercase letters, numbers, and hyphens. The technical name becomes part of file paths and the module federation remote name, so the slug format is mandatory. Uppercase letters, underscores, dots, and leading digits or hyphens are all rejected.
Source
Thrown at superset-extensions-cli/src/superset_extensions_cli/utils.py:252
"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:
ExtensionNameError: If display name is invalid
"""
if not display_name or not display_name.strip():View on GitHub (pinned to f4587218dd)
Solutions
- Convert the name to kebab-case: lowercase everything, replace spaces/underscores/dots with hyphens, strip leading/trailing hyphens (e.g. 'Dashboard Widgets' -> 'dashboard-widgets').
- The CLI ships suggest_technical_name(display_name) — use it to generate a valid slug from a human name.
- Ensure the first character is a lowercase letter, not a digit or hyphen.
Example fix
# before superset-extensions create my-org DashboardWidgets # ExtensionNameError: Extension name must start with a letter ... # after superset-extensions create my-org dashboard-widgets
Defensive patterns
Strategy: validation
Validate before calling
import re
TECH_NAME_RE = re.compile(r"^[a-z][a-z0-9-]*$")
def technical_name_is_valid(name: str) -> bool:
return bool(name) and bool(TECH_NAME_RE.match(name))
def to_slug(name: str) -> str:
return re.sub(r"^-+|-+$", "", re.sub(r"[^a-z0-9]+", "-", name.lower())) Prevention
- Always derive technical names with a kebab-case slugify helper rather than hand-typing them.
- Prefer the CLI's own suggest_technical_name(display_name) so the same rules validate and generate.
When it happens
Trigger: Calling `superset-extensions create my-org <name>` with names like 'DashboardWidgets' (camelCase), 'dashboard_widgets' (underscores), '1dashboard' (leading digit), '-widgets' (leading hyphen), or 'dashboard widgets' (space). Also direct calls to validate_technical_name() with such values.
Common situations: Deriving the technical name from a display name without kebab-casing; pasting npm package names that contain dots or scopes; camelCase muscle memory from JS identifiers.
Related errors
- Publisher must start with a letter and contain only lowercas
- Display name must start with a letter and can contain letter
- Extension name cannot be empty
- Display name cannot be empty
- Display name must contain at least one letter or number
AI-assisted analysis of apache/superset@f4587218dd (2026-08-14).
Data as JSON: /api/errors/c23f49e6683f7be4.
Report an issue: GitHub.