github/spec-kit · error · BundlerError
Catalog {source.id!r} URL is malformed: {url!r}
Error message
Catalog {source.id!r} URL is malformed: {url!r} What it means
Error "Catalog {source.id!r} URL is malformed: {url!r}" thrown in github/spec-kit.
Source
Thrown at src/specify_cli/bundler/services/adapters.py:129
return loads_json(path.read_text(encoding="utf-8"), origin=str(path))
def make_catalog_fetcher(*, allow_network: bool = True):
"""Return a fetcher callable suitable for :class:`CatalogStack`.
When *allow_network* is False, ``http(s)://`` sources raise instead of
touching the network (used by offline tests and ``--offline`` flows).
"""
def fetch(source: CatalogSource) -> dict:
url = source.url
try:
parsed = urlparse(url)
# Keep malformed authorities and ports inside the BundlerError
# contract even when a config file was edited by hand.
_ = parsed.port
except ValueError:
raise BundlerError(
f"Catalog {source.id!r} URL is malformed: {url!r}"
) from None
scheme = parsed.scheme.lower()
if scheme == "builtin":
if url == "builtin://community":
if allow_network:
return _http_get_json(source.id, COMMUNITY_CATALOG_URL)
return _load_packaged_community_catalog()
payload = _BUILTIN_CATALOGS.get(url)
if payload is None:
raise BundlerError(f"Unknown built-in catalog '{url}'.")
return payload
if scheme == "file":
path = _file_url_to_path(parsed)
if not path.exists():
raise BundlerError(f"Catalog file not found: {path}")View on GitHub (pinned to bf88c9f9a8)
Solutions
- Correct the catalog source URL in the catalog config so it is a well-formed URL.
When it happens
Trigger: Thrown at src/specify_cli/bundler/services/adapters.py:129 when the library encounters an invalid state.
Common situations: See trigger scenarios.
Understand the failure class
- Parsing and encoding errors: unexpected token, malformed input — why parsers reject input and how to find the real culprit.
AI-assisted analysis of github/spec-kit@bf88c9f9a8 (2026-08-14).
Data as JSON: /api/errors/5b38646bbc8d8494.
Report an issue: GitHub.