calesthio/OpenMontage · error · CheckpointValidationError
Stage {stage!r} with status {status!r} must include canonica
Error message
Stage {stage!r} with status {status!r} must include canonical artifact {required_artifact!r} What it means
The data URI was syntactically valid, but its declared MIME type is not in the supported set for that label (the set of values from the tool's suffix→MIME map for images or audio). The tool refuses to forward media in a format Ark does not accept.
Source
Thrown at lib/checkpoint.py:140
def _validate_artifacts_for_stage(
stage: str,
status: str,
artifacts: dict[str, Any],
) -> None:
# Valid stages come from the pipeline manifest (get_pipeline_stages), which
# can declare stages beyond the 9 canonical ones (e.g. character-animation's
# `character_design`/`rig_plan`, screen-demo's `real_capture`). Those have no
# canonical artifact, so look it up defensively — a missing entry means the
# stage simply has no required artifact, not a crash.
required_artifact = CANONICAL_STAGE_ARTIFACTS.get(stage)
if (
required_artifact is not None
and status in {"completed", "awaiting_human"}
and required_artifact not in artifacts
):
raise CheckpointValidationError(
f"Stage {stage!r} with status {status!r} must include "
f"canonical artifact {required_artifact!r}"
)
for artifact_name, artifact_data in artifacts.items():
if artifact_name not in ARTIFACT_NAMES:
continue
if not isinstance(artifact_data, dict):
raise CheckpointValidationError(
f"Artifact {artifact_name!r} must be a JSON object matching its schema"
)
try:
validate_artifact(artifact_name, artifact_data)
except Exception as exc:
raise CheckpointValidationError(
f"Artifact {artifact_name!r} failed schema validation: {exc}"
) from exc
View on GitHub (pinned to 95e1c3d0ab)
Solutions
- Re-encode to a supported MIME (jpeg/png/webp for images; the tool's listed audio formats for audio).
- Pass a local file so the tool derives the MIME from a controlled extension.
- Check the error-adjacent list: the unsupported-formats error prints the accepted suffixes for local files; keep data-URI MIME aligned with that set.
Example fix
# before
ref = "data:image/avif;base64,AAAA..."
# after
import base64
from PIL import Image
img = Image.open("photo.avif").convert("RGB")
img.save("photo.jpg", quality=85)
ref = "data:image/jpeg;base64," + base64.b64encode(open("photo.jpg","rb").read()).decode() Defensive patterns
Strategy: type-guard
Validate before calling
SUPPORTED_MIMES = {"image/jpeg", "image/png", "image/webp"} # align with the tool's map values
assert ref.split(";", 1)[0].removeprefix("data:").lower() in SUPPORTED_MIMES Type guard
def data_uri_mime_ok(v: str, allowed: set[str]) -> bool:
return v[5:].split(";", 1)[0].lower() in allowed if v.startswith("data:") else False Try / catch
try:
tool.run(inputs)
except ValueError as e:
if "Data URI MIME type" in str(e):
transcode_to_supported_mime(ref) # re-encode, rebuild URI, retry
else:
raise Prevention
- Restrict client-side exports to jpeg/png/webp before creating data URIs.
- Pass local files when format control matters; the tool then derives the MIME.
When it happens
Trigger: data:image/avif;base64,... or data:audio/ogg;base64,... when those MIME types are not in the map; declaring image/* generically; a GIF/HEIC data URI when only jpeg/png/webp are accepted.
Common situations: Browser-originated assets (webp/avif) pasted as data URIs; encoder defaults producing formats outside the allowlist; mimicking another provider's accepted data-URI formats.
Related errors
- Unknown or invalid style_playbook {style_playbook!r}. Availa
- Artifact {artifact_name!r} must be a JSON object matching it
- Artifact {artifact_name!r} failed schema validation: {exc}
- ${res.status} ${url}
- fetch failed ${r.status}: ${url}
AI-assisted analysis of calesthio/OpenMontage@95e1c3d0ab (2026-08-15).
Data as JSON: /api/errors/36e61c126eaeb671.
Report an issue: GitHub.