affaan-m/ECC · error · FileExistsError
output already exists; choose a new --out
Error message
output already exists; choose a new --out: {path} What it means
validate_output() refuses to overwrite existing files: it checks the output video path and its derived .fcpxml, .edl, .json siblings and raises FileExistsError if any exists (including dangling symlinks). This protects prior edits — each run's timelines reference shot files, so an accidental overwrite would destroy a previous edit.
Solutions
- Choose a new --out path for the run.
- Deliberately archive or delete the old output set (the video plus its .fcpxml/.edl/.json) before rerunning.
- In automation, generate a unique name, e.g. out = f'edit_{datetime.now():%Y%m%d%H%M%S}.mp4'.
Example fix
# before
forge('noir', takes, out='edit.mp4') # second run: exists
# after
from datetime import datetime
forge('noir', takes, out=f"edit_{datetime.now():%Y%m%d%H%M%S}.mp4") Defensive patterns
Strategy: validation
Validate before calling
from pathlib import Path
def output_is_free(out):
p = Path(out)
return not any(x.exists() or x.is_symlink()
for x in [p, *(p.with_suffix(s) for s in ('.fcpxml', '.edl', '.json'))]) Try / catch
try:
forge(genre, takes, out=out)
except FileExistsError as e:
print(f'pick a new --out: {e}') Prevention
- Generate unique output names (timestamp/uuid suffix) in automated runs.
- Check all four paths (video, .fcpxml, .edl, .json) for existence before rerunning.
- Treat the error as intentional protection — archive prior edits instead of deleting them reflexively.
When it happens
Trigger: Running forge twice with the same --out; an output, timeline, or manifest from a previous run still present at the target location; a leftover symlink at any of the four paths.
Common situations: Re-running a failed or successful job without changing --out; scheduled scripts reusing a fixed output name; resuming work in a directory that already contains edit.mp4/edit.fcpxml.
Understand the failure class
Background: "already exists" / EEXIST / FileAlreadyExistsException: what the 'file already exists' error means and how to fix it — this error's family across 37 libraries.
Related errors
- all overlays must be readable local files
- all takes must be readable local files
- base video must be a readable local file
- output must have a video suffix distinct from…
- Path does not exist
AI-assisted analysis of affaan-m/ECC@8321021c54 (2026-09-16).
Data as JSON: /api/errors/69c9688769394cc7.
Report an issue: GitHub.
Appendix: source
Thrown at skills/taste-application/scripts/forge.py:46
import numpy as np
from taste import assemble as asm
from taste import cadence as cad_mod
from taste import frames as frame_mod
from taste import grade as grade_mod
from taste import pack as pack_mod
from taste import plates as plate_mod
from taste import timeline as tl_mod
def validate_output(out_path: Path) -> None:
"""Refuse to replace either a viewing copy or any part of its handoff."""
outputs = [out_path, *(out_path.with_suffix(s) for s in (".fcpxml", ".edl", ".json"))]
if len(set(outputs)) != len(outputs):
raise ValueError("output must have a video suffix distinct from timeline/manifest files")
for path in outputs:
if path.exists() or path.is_symlink():
raise FileExistsError(f"output already exists; choose a new --out: {path}")
def forge(
genre: str,
takes: list[str],
out: str,
root: str = "stylepacks",
base_video: str | None = None,
base_ratio: float = 0.35,
overlays: list[str] | None = None,
overlay_every: int = 4,
overlay_opacity: float = 0.3,
duration: float | None = None,
strength: float = 1.0,
grade_base: bool = True,
width: int | None = None,
height: int | None = None,
work: str = "out/forge_work",View on GitHub (pinned to 8321021c54)