{"record":{"id":"28d855b2dd7584d0","repo":"affaan-m/ECC","slug":"no-media-and-no-stills-in-the-pack-nothing-to-lay-down","errorCode":null,"errorMessage":"no media and no stills in the pack - nothing to lay down","messagePattern":"no media and no stills in the pack - nothing to lay down","errorType":"console","errorClass":"SystemExit","httpStatus":null,"severity":"error","filePath":"skills/taste-application/scripts/resolve_ingest.py","lineNumber":218,"sourceCode":"        else:\n            print(f\"  !! no such media path, skipping: {e}\", file=sys.stderr)\n    if not out:\n        out = sp.stills()\n        if out:\n            print(f\"  no --media given; using {len(out)} pack stills as an animatic\")\n    return out\n\n\ndef build_clips(media: list[Path], cad: cad_mod.Cadence) -> list[dict]:\n    \"\"\"Marry media files to the reference's shot-length distribution.\n\n    The cadence is the payload here. Whichever list is longer sets the clip\n    count: extra media gets durations sampled from the reference distribution\n    (``Cadence.plan_shots``), extra shots cycle back through the media. Either\n    way the *rhythm* of the result is the reference's, not 5-seconds-a-clip.\n    \"\"\"\n    if not media:\n        raise SystemExit(\"no media and no stills in the pack - nothing to lay down\")\n\n    durations = [\n        float(s.get(\"duration\", 0.0)) for s in cad.shots if float(s.get(\"duration\", 0.0)) > 0.04\n    ]\n    if not durations:\n        durations = [max(cad.mean_shot, 1.0)]\n\n    n = max(len(media), len(durations))\n    if n > len(durations):\n        # Extend by sampling the reference's own distribution rather than\n        # repeating the tail, so the added shots inherit its variance.\n        shortfall = (n - len(durations)) * max(cad.mean_shot, 0.5)\n        durations = durations + list(cad.plan_shots(shortfall))\n    if len(durations) < n:  # plan_shots is stochastic; top up by cycling\n        base = list(durations)\n        durations += [base[i % len(base)] for i in range(n - len(base))]\n    durations = durations[:n]\n","sourceCodeStart":200,"sourceCodeEnd":236,"githubUrl":"https://github.com/affaan-m/ECC/blob/8321021c54d670126ce3b2969d5deb880b4b0c2a/skills/taste-application/scripts/resolve_ingest.py#L200-L236","documentation":"resolve_ingest.py's build_clips raises SystemExit when the pack contains neither media files nor stills, so there is nothing from which to lay clips on the timeline. Cadence alone cannot produce clips - at least one media item or still is required.","triggerScenarios":"Running resolve_ingest against a stylepack whose media/stills directories are empty or absent - e.g. mint never ran, mint produced no stills, or files were moved/deleted after minting.","commonSituations":"Pointing at the wrong --root or genre so the pack directories don't exist; a mint run that failed to export stills; manually cleaning the pack directory and re-running ingest only.","solutions":["Run mint.py first to populate the pack with stills/media","Verify the stylepack's stills and media directories exist and are non-empty","Ensure resolve_ingest uses the same --genre/--root as the mint run","If media was moved, restore it into the pack before ingest"],"exampleFix":"// before\npython resolve_ingest.py noir --root stylepacks   # empty pack\n// after\npython mint.py noir --refs ref.mp4\npython resolve_ingest.py noir --root stylepacks","handlingStrategy":"validation","validationCode":"from pathlib import Path\nsp = Path(root) / genre\nhas_content = any((sp / 'stills').glob('*')) or any((sp / 'media').glob('*'))\nif not has_content:\n    raise SystemExit(\"pack empty - run mint.py before resolve_ingest\")","typeGuard":null,"tryCatchPattern":"try:\n    build_clips(...)\nexcept SystemExit as e:\n    if 'nothing to lay down' in str(e):\n        run_mint_then_retry(genre, refs)","preventionTips":["Run mint.py before resolve_ingest in the same pipeline","Check stills/media directories are non-empty after mint","Keep pack directories intact between stages"],"tags":["missing-data","prerequisite","empty-input"],"backgroundTag":"empty-result-set","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"}