{"record":{"id":"25621525d157140f","repo":"sgl-project/sglang","slug":"label-is-empty-path","errorCode":null,"errorMessage":"{label} is empty: {path}","messagePattern":"(.+?) is empty: (.+?)","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":211,"sourceCode":"    )\n\n\ndef _safe_suffix(value: str | None) -> str | None:\n    if not value:\n        return None\n    suffix = Path(urllib.parse.urlsplit(value).path).suffix.lower()\n    if suffix and len(suffix) <= 10 and suffix[1:].isalnum():\n        return suffix\n    return None\n\n\ndef _checked_material_file(path: Path, *, label: str) -> str:\n    \"\"\"Validate that a localized source exists and is non-empty.\"\"\"\n\n    if not path.is_file():\n        raise FileNotFoundError(f\"{label} does not exist or is not a file: {path}\")\n    if path.stat().st_size <= 0:\n        raise ValueError(f\"{label} is empty: {path}\")\n    return str(path)\n\n\ndef _parse_frame_rate(value: Any) -> float:\n    if value in {None, \"\", \"N/A\", \"0/0\"}:\n        return 0.0\n    raw = str(value)\n    try:\n        if \"/\" in raw:\n            numerator, denominator = raw.split(\"/\", 1)\n            denominator_value = float(denominator)\n            parsed = float(numerator) / denominator_value if denominator_value else 0.0\n        else:\n            parsed = float(raw)\n        return parsed if math.isfinite(parsed) else 0.0\n    except (TypeError, ValueError, ZeroDivisionError):\n        return 0.0\n","sourceCodeStart":193,"sourceCodeEnd":229,"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#L193-L229","documentation":"The material file exists but has st_size <= 0, so it cannot contain valid media. Raised by _checked_material_file to fail fast instead of letting the image/video decoder produce confusing errors.","triggerScenarios":"A zero-byte file (or a file that stat()s to 0, like /dev/null-like nodes) passed as a MiniMax H3 material source.","commonSituations":"Interrupted downloads, placeholder files created by touch, truncated extraction from an archive, or wrong file picked up during staging.","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"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"from pathlib import Path\nassert Path(local_path).stat().st_size > 0","typeGuard":null,"tryCatchPattern":"try:\n    minimax_h3_localize_material_uri(uri)\nexcept ValueError as e:\n    if \"is empty\" in str(e):\n        re_fetch(uri)","preventionTips":["Verify file sizes after download/extract steps","Fail downloads that return 0 bytes"],"tags":["minimax-h3","empty-file","material-validation"],"backgroundTag":"empty-or-truncated-file","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}