{"record":{"id":"b37c90028e6dd96b","repo":"sgl-project/sglang","slug":"unsupported-tar-material-uri","errorCode":null,"errorMessage":"unsupported tar material URI","messagePattern":"unsupported tar material URI","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/minimax_h3/material_io.py","lineNumber":155,"sourceCode":"        if character.isspace():\n            continue\n        if len(character) != 1 or ord(character) > 127:\n            raise ValueError(\"material URI base64 payload must be ASCII\")\n        value = ord(character)\n        if value not in _BASE64_ALPHABET:\n            raise ValueError(\n                f\"material URI has an invalid base64 character {character!r}\"\n            )\n        yield value\n\n\ndef _parse_tar_member_uri(uri: str) -> tuple[Path, int, int, str | None]:\n    if uri.startswith(\"tar+offset://\"):\n        prefix = \"tar+offset://\"\n    elif uri.startswith(\"tar+b64header://\"):\n        prefix = \"tar+b64header://\"\n    else:\n        raise ValueError(\"unsupported tar material URI\")\n    try:\n        tar_path, encoded_header = uri[len(prefix) :].rsplit(\":\", 1)\n    except ValueError as exc:\n        raise ValueError(\n            \"tar material URI must contain '<tar_path>:<encoded_header>'\"\n        ) from exc\n    if len(encoded_header) > MINIMAX_H3_TAR_HEADER_MAX_ENCODED_CHARS:\n        raise ValueError(\"tar material URI encoded header is too large\")\n    padded = encoded_header + \"=\" * (-len(encoded_header) % 4)\n    try:\n        header = json.loads(\n            base64.b64decode(\n                padded.encode(\"ascii\"), altchars=b\"-_\", validate=True\n            ).decode(\"utf-8\")\n        )\n    except Exception as exc:\n        raise ValueError(\"tar material URI has an invalid encoded header\") from exc\n    if not isinstance(header, dict):","sourceCodeStart":137,"sourceCodeEnd":173,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/minimax_h3/material_io.py#L137-L173","documentation":"_parse_tar_member_uri only accepts URIs with the schemes 'tar+offset://' or 'tar+b64header://'. Any other scheme reaching this parser raises 'unsupported tar material URI', indicating the routing layer misclassified the URI or the scheme is misspelled.","triggerScenarios":"Calling the tar-member streaming path with a URI like 'tar://...', 'tar+json://...', or one missing the scheme entirely.","commonSituations":"Adding a new tar URI scheme without updating the parser, typos in scheme strings built by a producer, or dispatch logic that defaults unknown schemes to the tar path.","solutions":["Use exactly 'tar+offset://<tar_path>:<header>' or 'tar+b64header://<tar_path>:<header>'","Fix the dispatcher so non-tar schemes route to the base64 streamer instead","Centralize scheme constants instead of string literals on both producer and consumer sides"],"exampleFix":"// before\nuri = f\"tar://{tar_path}:{header}\"\n// after\nuri = f\"tar+b64header://{tar_path}:{encoded_header}\"","handlingStrategy":"type-guard","validationCode":"if not (uri.startswith('tar+offset://') or uri.startswith('tar+b64header://')):\n    raise ValueError('not a supported tar material URI')","typeGuard":"def is_supported_tar_uri(uri: str) -> bool:\n    return uri.startswith('tar+offset://') or uri.startswith('tar+b64header://')","tryCatchPattern":null,"preventionTips":["Use shared scheme constants from producer and consumer","Route unknown schemes to a generic error, not the tar parser"],"tags":["minimax-h3","tar-uri","scheme","material-io"],"backgroundTag":"unsupported-uri-scheme","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}