{"record":{"id":"8b9b2ef5bc7f8119","repo":"Hmbown/CodeWhale","slug":"founder-raster-missing-raster","errorCode":null,"errorMessage":"founder raster missing: {RASTER}","messagePattern":"founder raster missing: (.+?)","errorType":"console","errorClass":"SystemExit","httpStatus":null,"severity":"error","filePath":"scripts/brand/braille-mark.py","lineNumber":73,"sourceCode":"    (0, 0): 0x01,\n    (1, 0): 0x02,\n    (2, 0): 0x04,\n    (0, 1): 0x08,\n    (1, 1): 0x10,\n    (2, 1): 0x20,\n    (3, 0): 0x40,\n    (3, 1): 0x80,\n}\n\n\ndef is_navy(pixel: tuple[int, int, int]) -> bool:\n    r, g, b = pixel\n    return b > 60 and b > r + 25 and r < 110 and g < 150\n\n\ndef load_sheet() -> Image.Image:\n    if not RASTER.exists():\n        raise SystemExit(f\"founder raster missing: {RASTER}\")\n    image = Image.open(RASTER).convert(\"RGB\")\n    width, height = image.size\n    if width != height or width < 800:\n        raise SystemExit(f\"unexpected founder sheet geometry: {image.size}\")\n    return image\n\n\ndef band_box(image: Image.Image, band: tuple[float, float, float, float]):\n    width, height = image.size\n    return (\n        int(band[0] * width),\n        int(band[1] * width),\n        int(band[2] * height),\n        int(band[3] * height),\n    )\n\n\ndef hero_coverage(image: Image.Image) -> tuple[int, int, list[list[float]]]:","sourceCodeStart":55,"sourceCodeEnd":91,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/433685b2024e7bc4c99e1e2e326bcad39b4d9d65/scripts/brand/braille-mark.py#L55-L91","documentation":"`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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":"// before (script copied out of the repo)\n$ cp scripts/brand/braille-mark.py /tmp && python /tmp/braille-mark.py\nfounder raster missing: /brand/codewhalemarkfinal.png\n// after\n$ python scripts/brand/braille-mark.py  # run from the checkout","handlingStrategy":"validation","validationCode":"from pathlib import Path\nraster = Path(__file__).resolve().parents[2] / \"brand\" / \"codewhalemarkfinal.png\"\nif not raster.exists():\n    raise SystemExit(f\"fetch asset first: git lfs pull ({raster})\")","typeGuard":null,"tryCatchPattern":"try:\n    main()\nexcept SystemExit as e:\n    if \"founder raster missing\" in str(e):\n        subprocess.run([\"git\", \"lfs\", \"pull\"], check=True)\n        main()","preventionTips":["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"],"tags":["python","file-not-found","asset-missing","branding-script"],"backgroundTag":"file-not-found","analyzedSha":"433685b2024e7bc4c99e1e2e326bcad39b4d9d65","analyzedAt":"2026-09-15T12:24:24.634Z","contentChangedAt":"2026-09-15T12:24:24.634Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}