affaan-m/ECC · error · FileNotFoundError
no style pack ' ' under - run mint.py first
Error message
no style pack '{name}' under {root} - run mint.py first What it means
`load()` resolves a named StylePack under a root directory and raises a FileNotFoundError when the pack's manifest file is missing. Style packs must be generated first (via mint.py); loading a name that was never minted — or from the wrong root — trips this guard before any JSON is read. The message names the pack and root and explicitly suggests running mint.py.
Solutions
- Run the pack generator first: `python scripts/mint.py ...` to create the style pack and its manifest.
- Verify the expected path exists: `Path(root) / name / 'manifest.json'`; list `root` to see available packs.
- Pass the same `root=` used when minting if a custom root was used.
- Check pack name spelling and case, especially on case-sensitive filesystems.
Example fix
// before
pack = load('summer-film') # never minted -> FileNotFoundError
// after
from pathlib import Path
root = Path('packs')
if not (root / 'summer-film' / 'manifest.json').exists():
subprocess.run(['python', 'scripts/mint.py', '--name', 'summer-film', '--root', str(root)])
pack = load('summer-film', root=root) Defensive patterns
Strategy: try-catch
Validate before calling
from pathlib import Path
manifest = Path(root) / name / 'manifest.json'
if not manifest.is_file():
subprocess.run(['python', 'scripts/mint.py', '--name', name, '--root', str(root)]) Type guard
def pack_exists(name: str, root: str | Path) -> bool:
return (Path(root) / name / 'manifest.json').is_file() Try / catch
try:
pack = load(name, root)
except FileNotFoundError as e:
if 'run mint.py first' in str(e):
mint_pack(name, root)
pack = load(name, root)
else:
raise Prevention
- Run mint.py as a documented setup step before any grading
- Use one canonical packs root shared across scripts
- Validate pack names against a directory listing at CLI level
- Watch for case-sensitive filesystems when naming packs
When it happens
Trigger: Calling `load(name, root)` where `<root>/<name>/manifest.json` does not exist — wrong pack name, packs minted under a different root directory, typo in name, or the manifest file was deleted.
Common situations: Forgetting to run mint.py after cloning a fresh checkout; using the default root while packs were minted into a custom `root=`; case-sensitivity mismatches on Linux (MyPack vs mypack); renaming packs without re-minting.
Understand the failure class
Background: "Config file not found": what it means and how to fix it in docker-sync, Maven, Vagrant, Turborepo and other tools — this error's family across 60 libraries.
Related errors
- no style pack at - expected a pack.json manifest
- Install config not found
- Install module has invalid targets; expected an array of…
- Unknown install profile
- agent profile inheritance cycle
AI-assisted analysis of affaan-m/ECC@8321021c54 (2026-09-16).
Data as JSON: /api/errors/ce84138f24603042.
Report an issue: GitHub.
Appendix: source
Thrown at skills/taste-application/scripts/taste/pack.py:149
return path
def read_json(self, path: Path) -> dict:
if not path.exists():
return {}
return json.loads(path.read_text(encoding="utf-8"))
def archive(self, dest_dir: str | Path = "out") -> Path:
"""Zip the pack so a whole taste can be handed off as one file."""
dest_dir = Path(dest_dir)
dest_dir.mkdir(parents=True, exist_ok=True)
base = dest_dir / f"{self.name}-stylepack"
return Path(shutil.make_archive(str(base), "zip", root_dir=self.dir))
def load(name: str, root: str | Path = DEFAULT_ROOT) -> StylePack:
p = StylePack(name=name, root=Path(root))
if not p.manifest_path.exists():
raise FileNotFoundError(
f"no style pack '{name}' under {root} - run mint.py first"
)
p.manifest = json.loads(p.manifest_path.read_text(encoding="utf-8"))
return p
def create(name: str, root: str | Path = DEFAULT_ROOT) -> StylePack:
return StylePack(name=name, root=Path(root)).ensure()
def list_packs(root: str | Path = DEFAULT_ROOT) -> list[str]:
root = Path(root)
if not root.exists():
return []
return sorted(d.name for d in root.iterdir() if (d / "pack.json").exists())
View on GitHub (pinned to 8321021c54)