Wox-launcher/Wox · error · SystemExit

{path} is not a PNG file

Error message

{path} is not a PNG file

What it means

Error "{path} is not a PNG file" thrown in Wox-launcher/Wox.

Source

Thrown at assets/linux/write_hicolor_icons.py:36


def paeth(left: int, up: int, up_left: int) -> int:
    estimate = left + up - up_left
    distance_left = abs(estimate - left)
    distance_up = abs(estimate - up)
    distance_up_left = abs(estimate - up_left)
    if distance_left <= distance_up and distance_left <= distance_up_left:
        return left
    if distance_up <= distance_up_left:
        return up
    return up_left


def decode_rgba_png(path: pathlib.Path) -> tuple[int, int, bytearray]:
    """Decode an 8-bit RGBA PNG into raw pixels."""
    data = path.read_bytes()
    if not data.startswith(b"\x89PNG\r\n\x1a\n"):
        raise SystemExit(f"{path} is not a PNG file")

    width = height = None
    idat = bytearray()
    offset = 8
    while offset < len(data):
        length = struct.unpack(">I", data[offset : offset + 4])[0]
        offset += 4
        kind = data[offset : offset + 4]
        offset += 4
        payload = data[offset : offset + length]
        offset += length + 4
        if kind == b"IHDR":
            width, height, bit_depth, color_type, compression, filter_method, interlace = struct.unpack(">IIBBBBB", payload)
            if bit_depth != 8 or color_type != 6 or compression or filter_method or interlace:
                raise SystemExit(f"{path} must be an 8-bit non-interlaced RGBA PNG")
        elif kind == b"IDAT":
            idat.extend(payload)
        elif kind == b"IEND":

View on GitHub (pinned to 1659730fcb)

When it happens

Trigger: Thrown at assets/linux/write_hicolor_icons.py:36 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of Wox-launcher/Wox@1659730fcb (2026-08-15). Data as JSON: /api/errors/a2a61aac14952290. Report an issue: GitHub.