affaan-m/ECC · error · ValueError

output must have a video suffix distinct from…

Error message

output must have a video suffix distinct from timeline/manifest files

What it means

forge.validate_output() computes the output path plus the sibling .fcpxml, .edl and .json handoff files (generated via with_suffix). If the output path has no suffix, or its suffix is one of those, the derived set collapses to duplicates and the viewer copy would overwrite its own timeline/manifest, so it raises ValueError.

Solutions

  1. Pass an output path with a real video suffix (e.g. --out edit.mp4 or edit.mov) that is not .fcpxml/.edl/.json.
  2. Append the extension in your wrapper script: out = stem + '.mp4'.
  3. Check with Path(out).suffix before calling forge to catch the mistake early.

Example fix

# before
forge('noir', takes, out='edit')            # no suffix -> collapse

# after
forge('noir', takes, out='edit.mp4')        # distinct from .fcpxml/.edl/.json
Defensive patterns

Strategy: validation

Validate before calling

from pathlib import Path

def out_is_safe(out):
    p = Path(out)
    if p.suffix.lower() in {'.fcpxml', '.edl', '.json'} or not p.suffix:
        return False
    return len({p, *(p.with_suffix(s) for s in ('.fcpxml', '.edl', '.json'))}) == 4

Try / catch

try:
    forge(genre, takes, out=out)
except ValueError as e:
    if 'distinct from' in str(e):
        out = str(Path(out).with_suffix('.mp4')) if Path(out).suffix else out + '.mp4'
        forge(genre, takes, out=out)
    else:
        raise

Prevention

When it happens

Trigger: Calling forge(...) with --out given as a suffixless path (e.g. 'edit'), or an output whose suffix is .fcpxml, .edl, or .json (e.g. --out edit.json), so out_path.with_suffix('.json') equals out_path itself.

Common situations: Copy-pasting a timeline path as the --out argument; forgetting the video extension on the CLI; scripting that builds the out path from a stem without adding .mp4/.mov.

Understand the failure class

Background: "Invalid ... format", "must be in format X", "does not look like a ..." — invalid argument format errors across CLI tools and libraries — this error's family across 17 libraries.

Related errors


AI-assisted analysis of affaan-m/ECC@8321021c54 (2026-09-16). Data as JSON: /api/errors/52b9922c3d219461. Report an issue: GitHub.

Appendix: source

Thrown at skills/taste-application/scripts/forge.py:43

from datetime import datetime, timezone
from pathlib import Path

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,

View on GitHub (pinned to 8321021c54)