sgl-project/sglang · error · NotImplementedError
MiniMax H3 material localization does not support URI scheme
Error message
MiniMax H3 material localization does not support URI scheme {scheme!r} What it means
The URI scheme is not any of the supported ones (plain path, file, http/https, data, base64, tar+offset, tar+b64header, s3-refusal) — the dispatcher fell through to a blanket NotImplementedError.
Source
Thrown at python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/minimax_h3/material_io.py:876
if scheme in {"tar+offset", "tar+b64header"}:
output_path = _stream_tar_member_material(
batch,
uri,
condition_type=condition_type,
condition_index=condition_index,
)
try:
_validate_material_once(
batch, uri, output_path, condition_type=condition_type
)
except Exception:
Path(output_path).unlink(missing_ok=True)
raise
cache[uri] = output_path
return output_path
raise NotImplementedError(
f"MiniMax H3 material localization does not support URI scheme {scheme!r}"
)
def minimax_h3_probe_material(
batch: Any,
uri: str,
*,
condition_type: str,
condition_index: int,
) -> dict[str, Any]:
"""Localize and return cached display-geometry facts for one condition."""
path = minimax_h3_localize_material_uri(
batch,
uri,
condition_type=condition_type,
condition_index=condition_index,View on GitHub (pinned to 0132848349)
Solutions
- Convert the asset to a supported form: local path, file://, or http(s)://
- Fix the scheme typo
- Check urllib.parse.urlsplit(uri).scheme locally to pre-validate
Example fix
# before uri = "gs://bucket/img.png" # after uri = "https://storage.googleapis.com/bucket/img.png"
Defensive patterns
Strategy: validation
Validate before calling
from urllib.parse import urlsplit
SPECIAL = ('data:', 'base64:', 'tar+offset:', 'tar+b64header:')
def has_supported_scheme(uri: str) -> bool:
if uri.startswith(SPECIAL): return True
return urlsplit(uri).scheme in {'', 'file', 'http', 'https'}
assert has_supported_scheme(uri) Type guard
def has_supported_scheme(uri: str) -> bool:
if uri.startswith(('data:', 'base64:', 'tar+offset:', 'tar+b64header:')): return True
return urlsplit(uri).scheme in {'', 'file', 'http', 'https'} Try / catch
except NotImplementedError as e: map asset to a supported URI form
Prevention
- Document the scheme whitelist for users
- Lint URIs in request validation
When it happens
Trigger: Passing e.g. 'ftp://...', 'gs://...', or 'minio://...' as a material URI; also a malformed URI whose urlsplit yields an unexpected scheme field.
Common situations: Cloud-storage URIs (gs://, oss://), typos like 'htt://', or relative URIs that parse oddly.
Related errors
- tar material offset_data and size must be non-negative
- material URI has an invalid base64 payload
- material URI has invalid base64 padding
- material URI has data after base64 padding
- tar material payload is empty
AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28).
Data as JSON: /api/errors/defdc8bd8f23830c.
Report an issue: GitHub.