{"record":{"id":"ee057f69decba4e9","repo":"sgl-project/sglang","slug":"file-uri-host-must-be-local-got-parsed-netloc-r","errorCode":null,"errorMessage":"file URI host must be local, got {parsed.netloc!r}","messagePattern":"file URI host must be local, got (.+?)","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":790,"sourceCode":"    copying. HTTP(S), base64/data and direct tar-member URIs are materialized\n    once per request and cached for all MiniMax H3 consumers.\n    \"\"\"\n\n    if not isinstance(uri, str) or not uri:\n        raise ValueError(\"condition URI must be a non-empty string\")\n    parsed = None\n    for special_scheme in (\"data\", \"base64\", \"tar+offset\", \"tar+b64header\"):\n        if uri.startswith(special_scheme + \":\"):\n            scheme = special_scheme\n            break\n    else:\n        parsed = urllib.parse.urlsplit(uri)\n        scheme = parsed.scheme\n\n    if scheme == \"file\":\n        assert parsed is not None\n        if parsed.netloc not in {\"\", \"localhost\"}:\n            raise ValueError(f\"file URI host must be local, got {parsed.netloc!r}\")\n        output_path = _checked_material_file(\n            Path(urllib.parse.unquote(parsed.path)),\n            label=\"MiniMax H3 material source\",\n        )\n        _validate_material_once(batch, uri, output_path, condition_type=condition_type)\n        return output_path\n    if not scheme:\n        output_path = _checked_material_file(\n            Path(uri).expanduser(),\n            label=\"MiniMax H3 material source\",\n        )\n        _validate_material_once(batch, uri, output_path, condition_type=condition_type)\n        return output_path\n    if scheme == \"s3\":\n        raise NotImplementedError(\n            \"MiniMax H3 s3:// material URIs require a configured artifact resolver\"\n        )\n","sourceCodeStart":772,"sourceCodeEnd":808,"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#L772-L808","documentation":"A file:// material URI carried a non-local host component (netloc other than '' or 'localhost'). Only local files are supported for the file scheme.","triggerScenarios":"Passing 'file://hostname/path/to.png' or 'file://bucket/path' as the material URI.","commonSituations":"Developers assuming file:// supports remote hosts like smb://; copy-pasting URIs from other tooling that encodes the host.","solutions":["Use a plain absolute path '/path/to.png' or 'file:///path/to.png'","For remote assets use http(s):// and host the file","Mount the remote filesystem locally, then use the mount path"],"exampleFix":"# before\nuri = \"file://nas.example.com/data/img.png\"\n# after\nuri = \"/mnt/nas/data/img.png\"","handlingStrategy":"validation","validationCode":"from urllib.parse import urlsplit\nif uri.startswith('file://'):\n    assert urlsplit(uri).netloc in ('', 'localhost')","typeGuard":null,"tryCatchPattern":"except ValueError as e: rewrite URI to local path and retry","preventionTips":["Prefer plain absolute paths over file:// URIs"],"tags":["file-uri","minimax-h3","material-uri"],"backgroundTag":"unsupported-uri-scheme","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}