Hmbown/CodeWhale · error · SystemExit
founder raster missing
Error message
founder raster missing: {RASTER} What it means
`load_sheet()` opens the founder brand raster at `ROOT/brand/codewhalemarkfinal.png` and raises this SystemExit if the file does not exist. The script refuses to run against a missing source image rather than failing later in Pillow.
Solutions
- Verify the file exists: `ls brand/codewhalemarkfinal.png` relative to the repo root (two directories above the script)
- If assets use git-lfs, run `git lfs pull` to fetch the binary
- Run the script from within the repository checkout rather than a copied/extracted script folder
- Restore the raster if it was renamed/moved, or update RASTER in the script to the new path
Example fix
// before (script copied out of the repo) $ cp scripts/brand/braille-mark.py /tmp && python /tmp/braille-mark.py founder raster missing: /brand/codewhalemarkfinal.png // after $ python scripts/brand/braille-mark.py # run from the checkout
Defensive patterns
Strategy: validation
Validate before calling
from pathlib import Path
raster = Path(__file__).resolve().parents[2] / "brand" / "codewhalemarkfinal.png"
if not raster.exists():
raise SystemExit(f"fetch asset first: git lfs pull ({raster})") Try / catch
try:
main()
except SystemExit as e:
if "founder raster missing" in str(e):
subprocess.run(["git", "lfs", "pull"], check=True)
main() Prevention
- Run branding scripts from within the repo checkout, not copied copies
- Ensure git-lfs assets are pulled after clone
- Check `ls brand/codewhalemarkfinal.png` before batch runs
- Keep the RASTER path in sync if the asset moves
When it happens
Trigger: Calling `load_sheet()` (directly or via `write_png`/`main`) when `brand/codewhalemarkfinal.png` is absent from the repository checkout — the path is resolved relative to the script's parents[2], not the CWD.
Common situations: Shallow/partial clone or export that excluded binary assets; running the script from a copied location so parents[2] no longer points at the repo root; the raster renamed or moved; git-lfs assets not pulled.
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
- braille-mark.py requires pillow (`pip install pillow`)
- no navy hero whale found in the founder sheet
- unexpected founder sheet geometry
- accepted_requests must equal requests_attempted; sender…
- applied_version is not the final sent version
AI-assisted analysis of Hmbown/CodeWhale@433685b202 (2026-09-15).
Data as JSON: /api/errors/8b9b2ef5bc7f8119.
Report an issue: GitHub.
Appendix: source
Thrown at scripts/brand/braille-mark.py:73
(0, 0): 0x01,
(1, 0): 0x02,
(2, 0): 0x04,
(0, 1): 0x08,
(1, 1): 0x10,
(2, 1): 0x20,
(3, 0): 0x40,
(3, 1): 0x80,
}
def is_navy(pixel: tuple[int, int, int]) -> bool:
r, g, b = pixel
return b > 60 and b > r + 25 and r < 110 and g < 150
def load_sheet() -> Image.Image:
if not RASTER.exists():
raise SystemExit(f"founder raster missing: {RASTER}")
image = Image.open(RASTER).convert("RGB")
width, height = image.size
if width != height or width < 800:
raise SystemExit(f"unexpected founder sheet geometry: {image.size}")
return image
def band_box(image: Image.Image, band: tuple[float, float, float, float]):
width, height = image.size
return (
int(band[0] * width),
int(band[1] * width),
int(band[2] * height),
int(band[3] * height),
)
def hero_coverage(image: Image.Image) -> tuple[int, int, list[list[float]]]:View on GitHub (pinned to 433685b202)