calesthio/OpenMontage · error · CheckpointValidationError

Invalid status: {status!r}

Error message

Invalid status: {status!r}

What it means

shutil.which("ffprobe") returned None — ffprobe (part of FFmpeg) is not on PATH, and the tool requires it to measure local/data-URI reference audio duration (2–15s rule). This is an environment dependency check, not an input error.

Source

Thrown at lib/checkpoint.py:182

    Falls back to ALL_KNOWN_STAGES when pipeline_type is absent.
    """
    stage = checkpoint.get("stage")
    status = checkpoint.get("status")
    artifacts = checkpoint.get("artifacts")
    pipeline_type = checkpoint.get("pipeline_type")

    valid_stages = (
        set(get_pipeline_stages(pipeline_type)) if pipeline_type
        else ALL_KNOWN_STAGES
    )

    if not isinstance(stage, str) or stage not in valid_stages:
        raise CheckpointValidationError(
            f"Invalid stage: {stage!r} for pipeline {pipeline_type!r}. "
            f"Valid stages: {sorted(valid_stages)}"
        )
    if not isinstance(status, str):
        raise CheckpointValidationError(f"Invalid status: {status!r}")
    if not isinstance(artifacts, dict):
        raise CheckpointValidationError("Checkpoint artifacts must be a dictionary")

    _validate_artifacts_for_stage(stage, status, artifacts)

    try:
        jsonschema.validate(instance=checkpoint, schema=_load_checkpoint_schema())
    except jsonschema.ValidationError as exc:
        raise CheckpointValidationError(f"Checkpoint failed schema validation: {exc.message}") from exc


def _checkpoint_path(pipeline_dir: Path, project_id: str, stage: str) -> Path:
    return pipeline_dir / project_id / f"checkpoint_{stage}.json"


def init_project(
    project_id: str,
    *,

View on GitHub (pinned to 95e1c3d0ab)

Solutions

  1. Install FFmpeg: apt-get install -y ffmpeg (Debian/Ubuntu), apk add ffmpeg (Alpine), brew install ffmpeg (macOS).
  2. If installed in a custom location, add its bin directory to PATH for the process.
  3. As a workaround for this one path, use https URLs for audio references — but installing ffprobe is the supported fix.

Example fix

# before (container fails)
docker run myapp python -m tool --audio ref.wav
# after
RUN apt-get update && apt-get install -y --no-install-recommends ffmpeg
Defensive patterns

Strategy: type-guard

Validate before calling

import shutil
assert shutil.which("ffprobe"), "ffprobe missing: install ffmpeg and ensure it is on PATH"

Type guard

def ffprobe_available() -> bool:
    import shutil
    return shutil.which("ffprobe") is not None

Try / catch

try:
    tool.run(inputs)
except ValueError as e:
    if "ffprobe is required" in str(e):
        raise RuntimeError("Install ffmpeg (provides ffprobe) and retry; audio refs need it") from e
    raise

Prevention

When it happens

Trigger: Running in a minimal Docker image, CI runner, or slim Python environment without ffmpeg installed; a venv/PATH override that drops the directory containing ffprobe.

Common situations: Containerized deployments using python:slim or alpine without the ffmpeg package; CI pipelines where ffmpeg is present locally but not in the runner; Nix/asdf environments shadowing PATH.

Related errors


AI-assisted analysis of calesthio/OpenMontage@95e1c3d0ab (2026-08-15). Data as JSON: /api/errors/1139e174ed646e37. Report an issue: GitHub.