{"record":{"id":"ffe7eb64625e6483","repo":"affaan-m/ECC","slug":"base-video-must-be-a-readable-local-file","errorCode":null,"errorMessage":"base video must be a readable local file","messagePattern":"base video must be a readable local file","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"skills/taste-application/scripts/forge.py","lineNumber":73,"sourceCode":"    base_ratio: float = 0.35,\n    overlays: list[str] | None = None,\n    overlay_every: int = 4,\n    overlay_opacity: float = 0.3,\n    duration: float | None = None,\n    strength: float = 1.0,\n    grade_base: bool = True,\n    width: int | None = None,\n    height: int | None = None,\n    work: str = \"out/forge_work\",\n    plan: list[dict] | None = None,\n    fps: float | None = None,\n) -> Path:\n    out_path = Path(out)\n    validate_output(out_path)\n    if not takes or any(not Path(t).is_file() for t in takes):\n        raise ValueError(\"all takes must be readable local files\")\n    if base_video and not Path(base_video).is_file():\n        raise ValueError(\"base video must be a readable local file\")\n    if any(not Path(o).is_file() for o in (overlays or [])):\n        raise ValueError(\"all overlays must be readable local files\")\n    if fps is not None and (not math.isfinite(fps) or fps <= 0):\n        raise ValueError(\"fps must be finite and positive\")\n    sp = pack_mod.load(genre, root=root)\n    tgt = grade_mod.load_stats(sp.grade_path)\n    cad = cad_mod.load(sp.cadence_path)\n\n    # Geometry comes from the first take unless overridden; everything else is\n    # normalized to it so concat does not silently fail on a size mismatch.\n    info0 = frame_mod.probe(takes[0])\n    W = width or info0.width\n    H = height or info0.height\n    FPS = fps if fps is not None else info0.fps\n    if not math.isfinite(FPS) or FPS <= 0:\n        raise ValueError(\"source fps must be finite and positive; provide --fps\")\n    if W <= 0 or H <= 0:\n        raise ValueError(\"output width and height must be positive\")","sourceCodeStart":55,"sourceCodeEnd":91,"githubUrl":"https://github.com/affaan-m/ECC/blob/8321021c54d670126ce3b2969d5deb880b4b0c2a/skills/taste-application/scripts/forge.py#L55-L91","documentation":"forge() checks the optional base_video the same way as takes: when a base video is supplied it must be an existing regular file. A missing, mistyped, or non-file base path raises ValueError before any media processing starts.","triggerScenarios":"Passing base_video='footage/bg.mp4' where the file does not exist; pointing base_video at a directory; passing a URL instead of a local path (is_file() is False for remote paths).","commonSituations":"Base clip stored on an external drive not mounted; moving the project without moving the base video; confusing a remote asset URL with a local file requirement.","solutions":["Confirm the base video path exists and is a file: Path(base_video).is_file().","Download/copy remote base assets locally first — forge only accepts local files.","Fix typos or re-mount the volume holding the base clip.","Omit base_video if you did not intend to composite over a base clip (only non-empty values are checked)."],"exampleFix":"# before\nforge('noir', takes, base_video='b-roll/bg.mp4', out='edit.mp4')\n\n# after\nfrom pathlib import Path\nbase = Path('b-roll/bg.mp4')\nif base.is_file():\n    forge('noir', takes, base_video=str(base), out='edit.mp4')\nelse:\n    forge('noir', takes, out='edit.mp4')","handlingStrategy":"validation","validationCode":"from pathlib import Path\n\ndef base_ok(base_video):\n    return not base_video or Path(base_video).is_file()","typeGuard":null,"tryCatchPattern":"try:\n    forge(genre, takes, base_video=base_video, out=out)\nexcept ValueError as e:\n    if 'base video' in str(e):\n        print(f'base video missing: {base_video}')\n    raise","preventionTips":["Verify the base clip exists locally before passing it.","Download remote base assets to disk first — forge only reads local files.","Keep base assets inside the project directory so moves don't orphan them."],"tags":["cli","validation","filesystem","input"],"backgroundTag":"file-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"}