fishroom icon indicating copy to clipboard operation
fishroom copied to clipboard

Telegram发送表情导致telegrambot崩溃

Open Ares-X opened this issue 6 years ago • 0 comments

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

Ares-X avatar Jan 16 '18 06:01 Ares-X