{"record":{"id":"a2a61aac14952290","repo":"Wox-launcher/Wox","slug":"path-is-not-a-png-file","errorCode":null,"errorMessage":"{path} is not a PNG file","messagePattern":"(.+?) is not a PNG file","errorType":"console","errorClass":"SystemExit","httpStatus":null,"severity":"error","filePath":"assets/linux/write_hicolor_icons.py","lineNumber":36,"sourceCode":"\n\ndef paeth(left: int, up: int, up_left: int) -> int:\n    estimate = left + up - up_left\n    distance_left = abs(estimate - left)\n    distance_up = abs(estimate - up)\n    distance_up_left = abs(estimate - up_left)\n    if distance_left <= distance_up and distance_left <= distance_up_left:\n        return left\n    if distance_up <= distance_up_left:\n        return up\n    return up_left\n\n\ndef decode_rgba_png(path: pathlib.Path) -> tuple[int, int, bytearray]:\n    \"\"\"Decode an 8-bit RGBA PNG into raw pixels.\"\"\"\n    data = path.read_bytes()\n    if not data.startswith(b\"\\x89PNG\\r\\n\\x1a\\n\"):\n        raise SystemExit(f\"{path} is not a PNG file\")\n\n    width = height = None\n    idat = bytearray()\n    offset = 8\n    while offset < len(data):\n        length = struct.unpack(\">I\", data[offset : offset + 4])[0]\n        offset += 4\n        kind = data[offset : offset + 4]\n        offset += 4\n        payload = data[offset : offset + length]\n        offset += length + 4\n        if kind == b\"IHDR\":\n            width, height, bit_depth, color_type, compression, filter_method, interlace = struct.unpack(\">IIBBBBB\", payload)\n            if bit_depth != 8 or color_type != 6 or compression or filter_method or interlace:\n                raise SystemExit(f\"{path} must be an 8-bit non-interlaced RGBA PNG\")\n        elif kind == b\"IDAT\":\n            idat.extend(payload)\n        elif kind == b\"IEND\":","sourceCodeStart":18,"sourceCodeEnd":54,"githubUrl":"https://github.com/Wox-launcher/Wox/blob/1659730fcb37154f26497e07308b1f8789d659fe/assets/linux/write_hicolor_icons.py#L18-L54","documentation":"Error \"{path} is not a PNG file\" thrown in Wox-launcher/Wox.","triggerScenarios":"Thrown at assets/linux/write_hicolor_icons.py:36 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"1659730fcb37154f26497e07308b1f8789d659fe","analyzedAt":"2026-08-15T23:31:07.596Z","schemaVersion":2},"datasetVersion":"2026-08-16T03:17:38.424Z"}