affaan-m/ECC · error · FileNotFoundError
FileNotFoundError(source)
Error message
FileNotFoundError(source)
What it means
make_clip verifies the source media file exists before spawning ffmpeg, raising FileNotFoundError with the source path if it does not. This is a fail-fast guard so ffmpeg never runs against a missing input.
Solutions
- Check the path with Path(source).is_file() before calling make_clip and print the absolute path to debug
- Convert to an absolute path (Path(source).resolve()) and verify it points at the intended file
- Pass a directory-absolute path in your config or CLI invocation rather than a cwd-relative one
Example fix
// before
make_clip("assets/hero.jpg", "out.mp4", ...) # relative to wrong cwd
// after
from pathlib import Path
src = Path("assets/hero.jpg").resolve()
assert src.is_file(), f"missing source: {src}"
make_clip(str(src), "out.mp4", ...) Defensive patterns
Strategy: validation
Validate before calling
from pathlib import Path
src = Path(source)
if not src.is_file():
raise SystemExit(f"source media not found: {src.resolve()}") Try / catch
try:
make_clip(source, output, ...)
except FileNotFoundError as e:
print(f"Source media missing: {e}") Prevention
- Always resolve paths to absolute before passing them in
- Log Path(source).resolve() when debugging missing files
- Verify inputs exist in a preflight step before batch jobs
When it happens
Trigger: Calling make_clip(source=<path>) where Path(source).is_file() is False — a typo in the filename, a relative path resolved from the wrong working directory, or a file deleted between selection and clip creation.
Common situations: Running the script from a different cwd than expected; passing a directory instead of a file; stale paths from a config file after files were moved; Windows/POSIX path separator mistakes.
Understand the failure class
Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.
Related errors
- asset must be a local regular file
- cannot upload, file does not exist
- LUT not found
- no style pack at - expected a pack.json manifest
- Output must differ from the original source media
AI-assisted analysis of affaan-m/ECC@8321021c54 (2026-09-16).
Data as JSON: /api/errors/1272a5a3b2fdec53.
Report an issue: GitHub.
Appendix: source
Thrown at skills/taste-application/scripts/tasteforge/media/stills.py:54
def make_clip(
source,
output,
duration=4,
start_crop=(0, 0, 1, 1),
end_crop=(0.1, 0.1, 0.8, 0.8),
width=1920,
height=1080,
fps=30,
overwrite=False,
runner=subprocess.run,
):
geometry(width, height, fps, duration)
graph = filter_graph(
start_crop, end_crop, max(1, round(duration * fps)), width, height, fps
)
if not Path(source).is_file():
raise FileNotFoundError(source)
if Path(source).resolve() == Path(output).resolve():
raise ValueError("Output must differ from the original source media")
with output_file(output, overwrite) as temporary:
runner(
[
"ffmpeg",
"-nostdin",
"-y",
"-v",
"error",
"-i",
str(source),
"-vf",
graph,
"-an",
"-t",
str(duration),
"-c:v",View on GitHub (pinned to 8321021c54)