sgl-project/sglang · error · ValueError
is empty
Error message
{label} is empty: {path} What it means
The labeled MiniMax H3 material path resolved to an empty/missing file. Check the path and ensure the material exists.
Solutions
- Re-download or re-extract the material file and verify non-zero size
- Delete empty placeholder files from the material directory
- Check disk space / extraction logs if files are systematically empty
Defensive patterns
Strategy: validation
Validate before calling
from pathlib import Path assert Path(local_path).stat().st_size > 0
Try / catch
try:
minimax_h3_localize_material_uri(uri)
except ValueError as e:
if "is empty" in str(e):
re_fetch(uri) Prevention
- Verify file sizes after download/extract steps
- Fail downloads that return 0 bytes
When it happens
Trigger: A zero-byte file (or a file that stat()s to 0, like /dev/null-like nodes) passed as a MiniMax H3 material source.
Common situations: Interrupted downloads, placeholder files created by touch, truncated extraction from an archive, or wrong file picked up during staging.
Related errors
- adaln out_features mismatch
- adapt_shape_v1 ratio must be within the inclusive range 1:4…
- aligned video noise shape
- attention_head_dim must be positive.
- base64 URI header is too large
AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28).
Data as JSON: /api/errors/25621525d157140f.
Report an issue: GitHub.
Appendix: source
Thrown at python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/minimax_h3/material_io.py:211
)
def _safe_suffix(value: str | None) -> str | None:
if not value:
return None
suffix = Path(urllib.parse.urlsplit(value).path).suffix.lower()
if suffix and len(suffix) <= 10 and suffix[1:].isalnum():
return suffix
return None
def _checked_material_file(path: Path, *, label: str) -> str:
"""Validate that a localized source exists and is non-empty."""
if not path.is_file():
raise FileNotFoundError(f"{label} does not exist or is not a file: {path}")
if path.stat().st_size <= 0:
raise ValueError(f"{label} is empty: {path}")
return str(path)
def _parse_frame_rate(value: Any) -> float:
if value in {None, "", "N/A", "0/0"}:
return 0.0
raw = str(value)
try:
if "/" in raw:
numerator, denominator = raw.split("/", 1)
denominator_value = float(denominator)
parsed = float(numerator) / denominator_value if denominator_value else 0.0
else:
parsed = float(raw)
return parsed if math.isfinite(parsed) else 0.0
except (TypeError, ValueError, ZeroDivisionError):
return 0.0
View on GitHub (pinned to 0132848349)