Skip to content

Telegram发送表情导致telegrambot崩溃 #84

@Ares-X

Description

@Ares-X

Traceback报错:

Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/PIL/PngImagePlugin.py", line 724, in _save
    rawmode, mode = _OUTMODES[mode]
KeyError: 'RGBX'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/root/fishroom/fishroom/runner.py", line 37, in wrapper
    f(*args, **kwargs)
  File "/root/fishroom/fishroom/telegram.py", line 692, in Telegram2FishroomThread
    for msg in tg.message_stream(id_blacklist=tele_me):
  File "/root/fishroom/fishroom/telegram.py", line 540, in message_stream
    telemsg = self.parse_jmsg(jmsg)
  File "/root/fishroom/fishroom/telegram.py", line 372, in parse_jmsg
    url, err = self.upload_sticker(file_id)
  File "/root/fishroom/fishroom/telegram.py", line 284, in upload_sticker
    photo = webp2png(sticker)
  File "/root/fishroom/fishroom/helpers.py", line 50, in webp2png
    im.save(out, "PNG")
  File "/usr/local/lib/python3.5/dist-packages/PIL/Image.py", line 1930, in save
    save_handler(self, fp, filename)
  File "/usr/local/lib/python3.5/dist-packages/PIL/PngImagePlugin.py", line 726, in _save
    raise IOError("cannot write mode %s as PNG" % mode)
OSError: cannot write mode RGBX as PNG

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions