github/spec-kit · error · BundlerError

Component priority must be an integer, got {raw!r}.

Error message

Component priority must be an integer, got {raw!r}.

What it means

Error "Component priority must be an integer, got {raw!r}." thrown in github/spec-kit.

Source

Thrown at src/specify_cli/bundler/models/records.py:229

    if not cid:
        raise BundlerError(
            "Corrupt records file: a contributed component is missing its 'id'."
        )
    return ComponentRef(
        kind=kind,
        id=cid,
        version=(str(data["version"]) if data.get("version") else None),
        source=(str(data["source"]) if data.get("source") else None),
        priority=_parse_priority(data.get("priority")),
        strategy=(str(data["strategy"]) if data.get("strategy") else None),
    )


def _parse_priority(raw: Any) -> int | None:
    if raw is None:
        return None
    if isinstance(raw, bool) or not isinstance(raw, (int, str)):
        raise BundlerError(f"Component priority must be an integer, got {raw!r}.")
    try:
        return int(raw)
    except (TypeError, ValueError):
        raise BundlerError(
            f"Component priority must be an integer, got {raw!r}."
        ) from None


def _utc_now() -> str:
    return datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ")

View on GitHub (pinned to bf88c9f9a8)

Solutions

  1. Change the component priority in the records file to an integer value, or reinstall the bundle to regenerate valid records.

When it happens

Trigger: Thrown at src/specify_cli/bundler/models/records.py:229 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/b77e7113f9168cba. Report an issue: GitHub.