github/spec-kit · error · BundlerError

Catalog '{source_id}' URL must be a valid URL with a host: {

Error message

Catalog '{source_id}' URL must be a valid URL with a host: {url}

What it means

Error "Catalog '{source_id}' URL must be a valid URL with a host: {url}" thrown in github/spec-kit.

Source

Thrown at src/specify_cli/bundler/services/adapters.py:97

        hostname = parsed.hostname
        # Accessing ``port`` performs urllib's syntax/range validation.
        _ = parsed.port
    except ValueError:
        raise BundlerError(
            f"Catalog '{source_id}' URL is malformed: {url}"
        ) from None
    is_localhost = hostname in ("localhost", "127.0.0.1", "::1")
    if parsed.scheme != "https" and not (parsed.scheme == "http" and is_localhost):
        raise BundlerError(
            f"Catalog '{source_id}' URL must use HTTPS (got {parsed.scheme}://). "
            "HTTP is only allowed for localhost."
        )
    # Check hostname, not netloc: netloc is truthy for host-less URLs like
    # "https://:8080" or "https://user@...", so requiring netloc would let
    # those through even though they carry no host. hostname is None in those
    # cases. Mirrors the fix in ``specify_cli.catalogs`` (#3210).
    if not hostname:
        raise BundlerError(
            f"Catalog '{source_id}' URL must be a valid URL with a host: {url}"
        )


def _load_packaged_community_catalog() -> dict:
    core_pack = _locate_core_pack()
    path = (
        core_pack / "bundles" / "catalog.community.json"
        if core_pack is not None
        else _repo_root() / "bundles" / "catalog.community.json"
    )
    if not path.is_file():
        raise BundlerError(f"Bundled community catalog not found: {path}")
    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`.

View on GitHub (pinned to bf88c9f9a8)

Solutions

  1. Provide a catalog URL that includes a valid host, e.g. https://example.com/catalog.json.

When it happens

Trigger: Thrown at src/specify_cli/bundler/services/adapters.py:97 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/344d16ca695e2fc4. Report an issue: GitHub.