JuliusBrussee/caveman · error · CatalogError

{path}: invalid YAML: {error}

Error message

{path}: invalid YAML: {error}

What it means

Error "{path}: invalid YAML: {error}" thrown in JuliusBrussee/caveman.

Source

Thrown at shared/provider-catalog/validate_catalog.py:93

# comment line starting with this literal. verified_at is price provenance — the
# catalog_version a signed receipt attests — so a proposal that merges with its
# marker intact attests a price check nobody performed. Deleting the marker is
# the reviewer's statement that they confirmed the number against the provider's
# own pricing page; until then, the catalog is invalid.
# MUST stay a prefix of REVIEW_MARKER_PREFIX in that script (the test suite
# asserts it), or a renamed marker would sail past this rule.
REVIEW_MARKER = "# proposed-by:"


class CatalogError(ValueError):
    pass


def load_yaml(path: Path) -> list[dict[str, Any]]:
    try:
        document = yaml.safe_load(path.read_text(encoding="utf-8"))
    except (OSError, yaml.YAMLError) as error:
        raise CatalogError(f"{path}: invalid YAML: {error}") from error
    if not isinstance(document, list) or not document:
        raise CatalogError(f"{path}: catalog must be a non-empty list")
    if not all(isinstance(row, dict) for row in document):
        raise CatalogError(f"{path}: every catalog row must be an object")
    return document


def parsed_time(value: Any, label: str) -> datetime:
    if isinstance(value, datetime):
        parsed = value
    elif isinstance(value, str):
        try:
            parsed = datetime.fromisoformat(value.replace("Z", "+00:00"))
        except ValueError as error:
            raise CatalogError(f"{label}: verified_at must be RFC3339") from error
    else:
        raise CatalogError(f"{label}: verified_at must be an RFC3339 timestamp")
    if parsed.tzinfo is None:

View on GitHub (pinned to 27d5a3981a)

Solutions

  1. Fix the YAML syntax in the catalog file.

When it happens

Trigger: Thrown at shared/provider-catalog/validate_catalog.py:93 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of JuliusBrussee/caveman@27d5a3981a (2026-08-15). Data as JSON: /api/errors/9b8dd218be452749. Report an issue: GitHub.