calesthio/OpenMontage · error · FileNotFoundError
Schema not found: {path}
Error message
Schema not found: {path} What it means
Raised by schemas/artifacts/__init__.py's load_schema() when no {name}.schema.json exists in SCHEMA_DIR. Artifact schemas are resolved strictly by filename inside the schemas directory; the module also exports a fixed list of known artifact names (decision_log, source_media_review, final_review, character_qa_report, video_analysis_brief, and others). A miss means the artifact name is unknown or the schema file was not packaged.
Source
Thrown at schemas/artifacts/__init__.py:41
"asset_manifest",
"edit_decisions",
"render_report",
"publish_log",
"review",
"cost_log",
"decision_log",
"source_media_review",
"final_review",
"character_qa_report",
"video_analysis_brief",
]
def load_schema(name: str) -> dict:
"""Load a JSON schema by artifact name."""
path = SCHEMA_DIR / f"{name}.schema.json"
if not path.exists():
raise FileNotFoundError(f"Schema not found: {path}")
with open(path, encoding="utf-8") as f:
return json.load(f)
def validate_artifact(name: str, data: dict[str, Any]) -> None:
"""Validate artifact data against its schema. Raises on failure."""
schema = load_schema(name)
jsonschema.validate(instance=data, schema=schema)
def list_schemas() -> list[str]:
"""List all available artifact schema names."""
return [p.stem.replace(".schema", "") for p in SCHEMA_DIR.glob("*.schema.json")]
View on GitHub (pinned to 95e1c3d0ab)
Solutions
- Call list_schemas() and use an exact returned name.
- If the schema should exist, verify SCHEMA_DIR contains {name}.schema.json in your checkout/install.
- If packaging dropped the files, include package data (*.schema.json) in the build config.
Example fix
# before
validate_artifact("DecisionLog", data) # FileNotFoundError
# after
from schemas.artifacts import list_schemas, validate_artifact
print(list_schemas())
validate_artifact("decision_log", data) Defensive patterns
Strategy: validation
Validate before calling
from schemas.artifacts import list_schemas
available = set(list_schemas())
if artifact_name not in available:
raise SystemExit(f"Unknown artifact schema {artifact_name!r}. Available: {sorted(available)}") Type guard
from schemas.artifacts import list_schemas
def schema_exists(name: str) -> bool:
return name in set(list_schemas()) Try / catch
try:
validate_artifact(name, data)
except FileNotFoundError as e:
# unknown artifact name — the schema file was never found
raise SystemExit(f"{e}; valid names: {list_schemas()}") from e Prevention
- Resolve artifact names from list_schemas() instead of hand-typed strings.
- Include *.schema.json files as package data in builds.
- When adding a new artifact type, add its schema file in the same change.
When it happens
Trigger: Calling validate_artifact(name, data) or load_schema(name) with a typo'd, renamed, or unregistered artifact name; a packaging/checkout that omitted the .schema.json files; using a new artifact type before its schema was added.
Common situations: Typos and wrong casing in artifact names; artifact renamed between versions; the schemas directory missing in an installed package (data files not included in the wheel/manifest).
Related errors
- media not found
- Invalid stage: {stage!r} for pipeline {pipeline_type!r}. Val
- Reference image not found: {path}
- Input video not found: {path}
- Input file not found: {path}
AI-assisted analysis of calesthio/OpenMontage@95e1c3d0ab (2026-08-15).
Data as JSON: /api/errors/414b52e324e53071.
Report an issue: GitHub.