calesthio/OpenMontage · error · ValueError

unsupported local {label} format; expected one of {formats}

Error message

unsupported local {label} format; expected one of {formats}

What it means

Error "unsupported local {label} format; expected one of {formats}" thrown in calesthio/OpenMontage.

Source

Thrown at tools/video/seedance_ark.py:1041

        path = Path(value).expanduser()
        if not path.is_file():
            raise ValueError(
                f"{label} reference must be a public URL, asset:// ID, "
                f"or existing local file: {value}"
            )
        size = path.stat().st_size
        if size >= max_bytes:
            raise ValueError(
                f"local {label} must be smaller than {max_bytes // (1024 * 1024)} MB"
            )
        suffix = path.suffix.lower()
        mime = suffix_to_mime.get(suffix)
        if not mime:
            guessed, _ = mimetypes.guess_type(path.name)
            mime = guessed if guessed in suffix_to_mime.values() else None
        if not mime:
            formats = ", ".join(sorted(suffix_to_mime))
            raise ValueError(
                f"unsupported local {label} format; expected one of {formats}"
            )
        if label == "image":
            self._validate_local_image(path)
        elif label == "audio":
            self._probe_local_audio_duration(path)
        encoded = base64.b64encode(path.read_bytes()).decode("ascii")
        return f"data:{mime};base64,{encoded}"

    def _validate_local_image(self, path: Path) -> None:
        self._validate_image_bytes(path.read_bytes(), str(path))

    @staticmethod
    def _validate_image_bytes(data: bytes, source: str) -> None:
        try:
            from PIL import Image

            with Image.open(io.BytesIO(data)) as image:

View on GitHub (pinned to 95e1c3d0ab)

Solutions

  1. Convert the file to one of the listed supported formats before submitting.
  2. Check the actual file type with `file <path>` — the extension may not match the real content.

When it happens

Trigger: A local reference file has an extension/format outside the supported set for its media label.

Common situations: See trigger scenarios.


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