{"record":{"id":"763e53e2aa6a13d5","repo":"nexu-io/open-design","slug":"missing-generated-strip-for-state-strip-path","errorCode":null,"errorMessage":"missing generated strip for {state}: {strip_path}","messagePattern":"missing generated strip for (.+?): (.+?)","errorType":"exception","errorClass":"SystemExit","httpStatus":null,"severity":"error","filePath":"skills/hatch-pet/scripts/extract_strip_frames.py","lineNumber":291,"sourceCode":"    parser.add_argument(\"--chroma-key\", help=\"Override chroma key as #RRGGBB.\")\n    parser.add_argument(\"--key-threshold\", type=float, default=96.0)\n    parser.add_argument(\n        \"--method\",\n        choices=(\"auto\", \"components\", \"slots\"),\n        default=\"auto\",\n        help=\"Use connected sprite components when possible, or fixed equal slots.\",\n    )\n    args = parser.parse_args()\n\n    decoded_dir = Path(args.decoded_dir).expanduser().resolve()\n    output_dir = Path(args.output_dir).expanduser().resolve()\n    chroma_key = load_chroma_key(decoded_dir, args.chroma_key)\n    states = parse_states(args.states)\n    manifest = []\n    for state in states:\n        strip_path = decoded_dir / f\"{state}.png\"\n        if not strip_path.is_file():\n            raise SystemExit(f\"missing generated strip for {state}: {strip_path}\")\n        manifest.append(\n            extract_state(\n                strip_path,\n                state,\n                output_dir,\n                chroma_key,\n                args.key_threshold,\n                args.method,\n            )\n        )\n\n    (output_dir / \"frames-manifest.json\").write_text(\n        json.dumps(\n            {\n                \"ok\": True,\n                \"chroma_key\": {\n                    \"hex\": f\"#{chroma_key[0]:02X}{chroma_key[1]:02X}{chroma_key[2]:02X}\",\n                    \"rgb\": list(chroma_key),","sourceCodeStart":273,"sourceCodeEnd":309,"githubUrl":"https://github.com/nexu-io/open-design/blob/5be4028344c2eb4c667c5a97bda8f750c5597ef7/skills/hatch-pet/scripts/extract_strip_frames.py#L273-L309","documentation":"For each requested state the script expects <decoded_dir>/<state>.png to exist. If a state's strip is absent it cannot be processed, and the run aborts before writing frames-manifest.json.","triggerScenarios":"Passing --states (or --states all) where one or more named states have no corresponding <decoded_dir>/<state>.png on disk.","commonSituations":"Running --states all before every strip has been generated/decoded; a state that failed generation but is still listed; decoded-dir pointing at the wrong folder.","solutions":["List available strips: ls <decoded_dir>/*.png.","Generate and decode the missing state's strip first.","Narrow --states to only the states whose strips currently exist.","Confirm --decoded-dir resolves to the right directory."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"from pathlib import Path\n\ndecoded_dir = Path(\"<decoded_dir>\")\nneeded = [\"idle\", \"running-right\", \"running-left\"]  # or the full known set\nmissing = [s for s in needed if not (decoded_dir / f\"{s}.png\").is_file()]\nassert not missing, f\"missing strips: {missing}\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Generate and decode all required states before running extraction.","Scope --states to exactly the strips you have on disk.","Verify --decoded-dir is correct before invoking."],"tags":["hatch-pet","filesystem","states","missing-file"],"backgroundTag":null,"analyzedSha":"5be4028344c2eb4c667c5a97bda8f750c5597ef7","analyzedAt":"2026-08-12T12:03:58.812Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}