sgl-project/sglang · critical · FileNotFoundError
expert-pack or manifest is missing: {self.path}, {self.manif
Error message
expert-pack or manifest is missing: {self.path}, {self.manifest_path} What it means
ExpertPackStore.__init__ raises FileNotFoundError when either the pack file (self.path) or its sidecar manifest (default: <pack>.manifest.json) does not exist as a regular file. Both files are mandatory: the pack holds the binary data, the manifest holds completeness and checksum metadata.
Source
Thrown at python/sglang/srt/layers/moe/expert_pack.py:260
expected_top_k: int,
expected_source_sha256: str | None = None,
expected_model_identity_sha256: str | None = None,
expected_config_sha256: str | None = None,
cache_vram_mib: int = 20 * 1024,
cache_vram_reserve_mib: int = 3 * 1024,
stage_slots: int = 8,
read_splits: int = READ_SPLITS,
direct_io: bool = False,
stats_flush_interval: int = 0,
verify_pack_sha256: bool = False,
stats_path: str | os.PathLike[str] | None = None,
) -> None:
self.path = Path(pack_path).resolve()
self.manifest_path = Path(
manifest_path or str(self.path) + ".manifest.json"
).resolve()
if not self.path.is_file() or not self.manifest_path.is_file():
raise FileNotFoundError(
f"expert-pack or manifest is missing: {self.path}, {self.manifest_path}"
)
self.manifest = json.loads(self.manifest_path.read_text(encoding="utf-8"))
if not self.manifest.get("complete"):
raise ValueError("expert-pack manifest is not complete")
with self.path.open("rb", buffering=0) as stream:
self.header = ExpertPackHeader.read(stream)
entries = [
ExpertPackEntry.read(stream) for _ in range(self.header.index_count)
]
expected_dimensions = (expected_layers, expected_experts, expected_top_k)
actual_dimensions = (
self.header.num_layers,
self.header.num_experts,
self.header.top_k,
)View on GitHub (pinned to 0132848349)
Solutions
- Check both paths exist and re-copy the missing manifest sidecar next to the pack
- Use absolute paths or resolve relative to a known base directory instead of CWD
- If the pack was mid-export, wait for the packer to finish writing the manifest before loading
Example fix
# before
store = ExpertPackStore("weights/mymodel.expertpack") # manifest not copied
# after
from pathlib import Path
base = Path("/models/mymodel")
store = ExpertPackStore(base / "mymodel.expertpack",
manifest_path=base / "mymodel.expertpack.manifest.json") Defensive patterns
Strategy: validation
Validate before calling
from pathlib import Path
def pack_and_manifest_exist(pack_path, manifest_path=None):
p = Path(pack_path).resolve()
m = Path(manifest_path or str(p) + ".manifest.json").resolve()
return p.is_file() and m.is_file(), p, m Try / catch
try:
store = ExpertPackStore(pack_path)
except FileNotFoundError as e:
logger.error("missing pack artifacts: %s", e)
raise Prevention
- Distribute the pack and its .manifest.json sidecar together
- Build paths from an absolute base directory, not CWD-relative strings
- Before loading, assert both files exist and the manifest marks complete=true
When it happens
Trigger: Constructing ExpertPackStore("experts.pack") where experts.pack or experts.pack.manifest.json is missing, moved, or is a directory/symlink-to-nowhere; or passing a manifest_path that doesn't exist.
Common situations: Wrong or relative path resolved against a different CWD (paths are .resolve()'d); manifest not copied alongside the pack during distribution; typos in filenames; pack still being written (manifest written last).
Understand the failure class
Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.
Related errors
- expert-pack header coverage is inconsistent
- expert-pack is not identity triplet layout
- expert-pack alignment is invalid
- expert-pack data offset is invalid
- expert-pack index is truncated
AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28).
Data as JSON: /api/errors/5f4374804610ab19.
Report an issue: GitHub.