nexu-io/open-design · error · SystemExit
file not found: {path}
Error message
file not found: {path} What it means
Raised by load_json() in queue_pet_repairs.py when the resolved JSON path (the --review file or run_dir/imagegen-jobs.json) does not exist on disk. It is the generic 'input file missing' guard used for both the QA review and the job manifest before any parsing.
Source
Thrown at skills/hatch-pet/scripts/queue_pet_repairs.py:15
#!/usr/bin/env python3
"""Reopen failed Codex pet row jobs after frame QA."""
from __future__ import annotations
import argparse
import json
import shutil
from datetime import datetime, timezone
from pathlib import Path
def load_json(path: Path) -> dict[str, object]:
if not path.exists():
raise SystemExit(f"file not found: {path}")
return json.loads(path.read_text(encoding="utf-8"))
def rows_to_repair(
review: dict[str, object], *, repair_on_warnings: bool
) -> list[dict[str, object]]:
rows = review.get("rows")
if not isinstance(rows, list):
raise SystemExit("review does not contain row-level results")
repairs: list[dict[str, object]] = []
for row in rows:
if not isinstance(row, dict) or not isinstance(row.get("state"), str):
continue
errors = row.get("errors") if isinstance(row.get("errors"), list) else []
warnings = row.get("warnings") if isinstance(row.get("warnings"), list) else []
if errors or (repair_on_warnings and warnings):
repairs.append(View on GitHub (pinned to 5be4028344)
Solutions
- Run prepare_pet_run.py first so run_dir/imagegen-jobs.json exists.
- Run the QA review step so run_dir/qa/review.json exists (or pass --review <existing-path>).
- Double-check the --run-dir value resolves to the prepared run directory.
- If the file was deleted, regenerate it rather than creating an empty stub.
Example fix
# before queue_pet_repairs.py --run-dir /tmp/fenrir # after (ensure inputs exist first) prepare_pet_run.py --pet-name Fenrir --reference fenrir.png # ... run imagegen + QA review ... queue_pet_repairs.py --run-dir /tmp/fenrir
Defensive patterns
Strategy: validation
Validate before calling
from pathlib import Path
for p in [review_path, manifest_path]:
if not Path(p).exists():
raise SystemExit(f"missing input: {p}; run prepare_pet_run.py / QA review first") Prevention
- Run prepare_pet_run.py and the QA review before queue_pet_repairs.py.
- Pin --run-dir with an absolute path.
- Add a pipeline orchestrator that checks both files exist before invoking the repair step.
When it happens
Trigger: Calling queue_pet_repairs.py against a run_dir that was never prepared by prepare_pet_run.py (no imagegen-jobs.json); passing --review pointing at a nonexistent review.json; running from the wrong cwd so the default run_dir/qa/review.json resolves elsewhere.
Common situations: Trying to repair before the QA review step produced review.json; pointing --run-dir at a typo'd path; the manifest was deleted or moved after generation.
Related errors
- reference not found: {source}
- row prompt not found: {prompt_path}
- job manifest not found: {path}
- job {job.get('id')} is missing required grounding image(s):
- source image not found: {source}
AI-assisted analysis of nexu-io/open-design@5be4028344 (2026-08-12).
Data as JSON: /api/errors/203837fd5c8db613.
Report an issue: GitHub.