{"record":{"id":"4899a17480a5a6a8","repo":"affaan-m/ECC","slug":"pack-genre-has-no-stills-under-sp-stills-dir-run-mint-py-4899a1","errorCode":null,"errorMessage":"pack '{genre}' has no stills under {sp.stills_dir} - run mint.py first","messagePattern":"pack '(.+?)' has no stills under (.+?) - run mint\\.py first","errorType":"console","errorClass":"SystemExit","httpStatus":null,"severity":"error","filePath":"skills/taste-distillation/scripts/distill.py","lineNumber":417,"sourceCode":"    return {\n        \"source_still\": hero.name,\n        \"detail_score\": round(score, 3),\n        \"mesh_url\": mesh_url,\n        \"file\": dest.name,\n        \"endpoint\": falapi.ENDPOINTS[\"image_to_3d\"],\n    }\n\n\ndef distill(\n    genre: str,\n    root: str = \"stylepacks\",\n    max_stills: int = 6,\n    props: bool = True,\n) -> pack_mod.StylePack:\n    sp = pack_mod.load(genre, root=root)\n    all_stills = sp.stills()\n    if not all_stills:\n        raise SystemExit(\n            f\"pack '{genre}' has no stills under {sp.stills_dir} - run mint.py first\"\n        )\n\n    chosen = pick_stills(all_stills, max_stills)\n    mode = \"DRY RUN\" if falapi.is_dry_run() else \"live\"\n    print(f\"distilling '{genre}' [{mode}] from {len(chosen)}/{len(all_stills)} stills\")\n\n    urls = falapi.upload_many(chosen)\n    print(f\"  uploaded       : {len(urls)} still(s)\")\n\n    grounding = build_grounding(sp)\n    if grounding:\n        print(f\"  grounding VLM with {len(grounding.splitlines())} measured facts\")\n    spec, provenance = describe(urls, grounding=grounding)\n\n    spec[\"source\"] = {\n        \"pack\": genre,\n        \"generated\": datetime.now(timezone.utc).strftime(\"%Y-%m-%dT%H:%M:%SZ\"),","sourceCodeStart":399,"sourceCodeEnd":435,"githubUrl":"https://github.com/affaan-m/ECC/blob/8321021c54d670126ce3b2969d5deb880b4b0c2a/skills/taste-distillation/scripts/distill.py#L399-L435","documentation":"distill() loads the style pack via pack_mod.load() and calls sp.stills() to list generated still images. If the pack directory contains no stills, it raises SystemExit instructing the user to run mint.py first, because distillation requires reference stills produced by the minting step.","triggerScenarios":"Running `distill.py <genre>` where the pack at sp.stills_dir has zero image files: mint.py was never run for this genre, the wrong --root was passed so load() found an empty/other pack, stills were deleted, or the stills_dir configured in the pack is wrong.","commonSituations":"Fresh checkout where only distill.py is run; pointing --root at a directory that lacks the pack's outputs; mint.py failed partway earlier leaving no stills; genre name typo resolving to an empty pack.","solutions":["Run mint.py for the genre first to generate stills, then re-run distill.py.","Check the stills directory printed in the message and confirm it contains image files (ls the path).","Verify the --root argument points to the same root used when minting the pack.","Confirm the genre name is spelled correctly and matches an existing minted pack.","Re-run mint.py if a previous mint attempt failed before writing stills."],"exampleFix":"// before\npython distill.py cinematic\n# SystemExit: pack 'cinematic' has no stills under ... - run mint.py first\n\n// after\npython mint.py cinematic   # generate stills first\npython distill.py cinematic","handlingStrategy":"validation","validationCode":"from pathlib import Path\nstills_dir = Path(pack_root) / \"stills\"\nif not any(stills_dir.glob(\"*.png\")):\n    raise SystemExit(f\"no stills in {stills_dir}; run mint.py first\")","typeGuard":"null","tryCatchPattern":"try:\n    distill(genre, root)\nexcept SystemExit as exc:\n    if \"run mint.py first\" in str(exc):\n        subprocess.run([\"python\", \"mint.py\", genre], check=True)\n        distill(genre, root)\n    else:\n        raise","preventionTips":["Always run mint.py before distill.py in pipeline scripts","Check the pack's stills directory is non-empty as a preflight step","Use the same --root value for mint and distill","Verify genre names against the list of minted packs","Script the full pipeline (mint -> distill) so steps can't be skipped"],"tags":["cli","missing-input","pipeline","files"],"backgroundTag":"directory-not-found","analyzedSha":"8321021c54d670126ce3b2969d5deb880b4b0c2a","analyzedAt":"2026-09-16T10:08:13.343Z","contentChangedAt":"2026-09-16T10:08:13.343Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}