{"record":{"id":"ced0d1a0cec1400c","repo":"sgl-project/sglang","slug":"label-does-not-exist-or-is-not-a-file-path","errorCode":null,"errorMessage":"{label} does not exist or is not a file: {path}","messagePattern":"(.+?) does not exist or is not a file: (.+?)","errorType":"validation","errorClass":"FileNotFoundError","httpStatus":null,"severity":"error","filePath":"python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/minimax_h3/material_io.py","lineNumber":209,"sourceCode":"        size,\n        str(header.get(\"member\") or \"\") or None,\n    )\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):","sourceCodeStart":191,"sourceCodeEnd":227,"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#L191-L227","documentation":"Raised by _checked_material_file when a localized material source path does not exist or is not a regular file (directory, broken symlink, fifo). The pipeline validates all material URIs resolve to real, readable files before downstream stages.","triggerScenarios":"Calling minimax_h3_localize_material_uri with a file:// or plain path URI where the path is missing, is a directory, or points through a broken symlink.","commonSituations":"Material directory mounted at a different path in a container, typo'd path in the request, symlink target absent, or material file not yet synced/downloaded when the pipeline runs.","solutions":["Check the path exists and is a file: ls -l /path/to/material","Fix the URI/path in the request or mount the material volume at the expected location","Ensure material download/extraction completes before the pipeline stage runs"],"exampleFix":"// before\nuri = \"file:///data/missing.jpg\"\n// after\nuri = \"file:///data/materials/missing.jpg\"  # verified with Path(uri).is_file()","handlingStrategy":"validation","validationCode":"from pathlib import Path\np = Path(local_path)\nassert p.is_file(), f\"material missing: {p}\"","typeGuard":"def is_material_file(p: str) -> bool:\n    from pathlib import Path\n    return Path(p).expanduser().is_file()","tryCatchPattern":"try:\n    minimax_h3_localize_material_uri(uri)\nexcept FileNotFoundError as e:\n    retry_after_sync(uri)  # re-check after download/mount settles","preventionTips":["Pre-flight check all material paths before starting the pipeline","Ensure volumes are mounted and material downloads complete before the stage runs"],"tags":["minimax-h3","file-not-found","material-localization"],"backgroundTag":"file-not-found","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}