{"record":{"id":"38eecf6f32d4a67a","repo":"calesthio/OpenMontage","slug":"local-label-must-be-smaller-than-max-bytes","errorCode":null,"errorMessage":"local {label} must be smaller than {max_bytes // (1024 * 1024)} MB","messagePattern":"local (.+?) must be smaller than (.+?) MB","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"tools/video/seedance_ark.py","lineNumber":1031,"sourceCode":"        value = str(ref)\n        if value.startswith(\"data:\"):\n            return self._validate_data_uri(\n                value,\n                suffix_to_mime=suffix_to_mime,\n                max_bytes=max_bytes,\n                label=label,\n            )\n        if self._is_remote_or_asset(value):\n            return value\n        path = Path(value).expanduser()\n        if not path.is_file():\n            raise ValueError(\n                f\"{label} reference must be a public URL, asset:// ID, \"\n                f\"or existing local file: {value}\"\n            )\n        size = path.stat().st_size\n        if size >= max_bytes:\n            raise ValueError(\n                f\"local {label} must be smaller than {max_bytes // (1024 * 1024)} MB\"\n            )\n        suffix = path.suffix.lower()\n        mime = suffix_to_mime.get(suffix)\n        if not mime:\n            guessed, _ = mimetypes.guess_type(path.name)\n            mime = guessed if guessed in suffix_to_mime.values() else None\n        if not mime:\n            formats = \", \".join(sorted(suffix_to_mime))\n            raise ValueError(\n                f\"unsupported local {label} format; expected one of {formats}\"\n            )\n        if label == \"image\":\n            self._validate_local_image(path)\n        elif label == \"audio\":\n            self._probe_local_audio_duration(path)\n        encoded = base64.b64encode(path.read_bytes()).decode(\"ascii\")\n        return f\"data:{mime};base64,{encoded}\"","sourceCodeStart":1013,"sourceCodeEnd":1049,"githubUrl":"https://github.com/calesthio/OpenMontage/blob/95e1c3d0ab93482159818560f6a8c8e866b9139f/tools/video/seedance_ark.py#L1013-L1049","documentation":"Error \"local {label} must be smaller than {max_bytes // (1024 * 1024)} MB\" thrown in calesthio/OpenMontage.","triggerScenarios":"A local reference file exceeds the maximum allowed byte size for Seedance Ark reference media.","commonSituations":"See trigger scenarios.","solutions":["Downscale or recompress the local file to below the stated MB limit (e.g. with ffmpeg or Pillow).","Or upload the original to a URL/asset and reference it remotely instead of inline."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"95e1c3d0ab93482159818560f6a8c8e866b9139f","analyzedAt":"2026-08-15T06:31:20.014Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}