github/spec-kit · error · IntegrationValidationError
Invalid catalog entry at index {idx} in {config_path}: expec
Error message
Invalid catalog entry at index {idx} in {config_path}: expected a mapping, got {type(cat).__name__}. What it means
Error "Invalid catalog entry at index {idx} in {config_path}: expected a mapping, got {type(cat).__name__}." thrown in github/spec-kit.
Source
Thrown at src/specify_cli/integrations/catalog.py:439
"(expected a mapping)."
)
data = raw
catalogs = data.get("catalogs", [])
if not isinstance(catalogs, list):
raise IntegrationValidationError(
f"Catalog config {config_path} has invalid 'catalogs' value: "
"must be a list."
)
# Validate each existing entry before mutating anything. Fail fast so
# we don't silently preserve a corrupt sibling entry or derive a new
# priority from a bogus value.
existing_priorities: List[int] = []
valid_catalog_count = 0
for idx, cat in enumerate(catalogs):
if not isinstance(cat, dict):
raise IntegrationValidationError(
f"Invalid catalog entry at index {idx} in {config_path}: "
f"expected a mapping, got {type(cat).__name__}."
)
existing_url = str(cat.get("url", "")).strip()
if not existing_url:
continue
# Re-run the same URL validation used when loading, so a corrupt
# entry surfaces here instead of at the next `integration` call.
try:
self._validate_catalog_url(existing_url)
except IntegrationCatalogError as exc:
raise IntegrationValidationError(
f"Invalid catalog entry at index {idx} in {config_path}: {exc}"
) from exc
if existing_url == url:
raise IntegrationValidationError(
f"Catalog URL already configured: {url}"
)View on GitHub (pinned to bf88c9f9a8)
Solutions
- Make each catalog entry in the config a mapping with url/priority fields.
When it happens
Trigger: Thrown at src/specify_cli/integrations/catalog.py:439 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of github/spec-kit@bf88c9f9a8 (2026-08-14).
Data as JSON: /api/errors/1bacc0acb1c95f11.
Report an issue: GitHub.