Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

telegram无法发送贴纸到wechat #109

Closed
thedogb opened this issue Jan 11, 2018 · 9 comments
Closed

telegram无法发送贴纸到wechat #109

thedogb opened this issue Jan 11, 2018 · 9 comments
Labels

Comments

@thedogb
Copy link

thedogb commented Jan 11, 2018

11-01-2018:14:28:09,659 ERROR    [dispatcher.py:301]
     An uncaught error was raised while processing the update
Traceback (most recent call last):
  File "/lib/python3.6/site-packages/telegram/ext/dispatcher.py", line 279, in process_update
    handler.handle_update(update, self)
  File "lib/python3.6/site-packages/telegram/ext/messagehandler.py", line 169, in handle_update
    return self.callback(dispatcher.bot, update, **optional_args)
  File "/wechatToTelegram/plugins/eh_telegram_master/__init__.py", line 1128, in msg
    return self.process_telegram_message(bot, update)
  File "/wechatToTelegram/plugins/eh_telegram_master/__init__.py", line 1340, in process_telegram_message
    slave_msg = self.slaves[channel].send_message(m)
  File "/wechatToTelegram/plugins/eh_wechat_slave.py", line 681, in send_message
    img.save("%s.gif" % msg.path, transparency=255)
  File "lib/python3.6/site-packages/PIL/Image.py", line 1930, in save
    save_handler(self, fp, filename)
  File "/lib/python3.6/site-packages/PIL/GifImagePlugin.py", line 468, in _save
    _write_single_frame(im, fp, palette)
  File "lib/python3.6/site-packages/PIL/GifImagePlugin.py", line 376, in _write_single_frame
    for s in _get_global_header(im_out, im.encoderinfo):
  File "lib/python3.6/site-packages/PIL/GifImagePlugin.py", line 715, in _get_global_header
    o8(background) + o8(0),
  File "lib/python3.6/site-packages/PIL/_binary.py", line 27, in o8
    return bytes((i & 255,))
TypeError: unsupported operand type(s) for &: 'tuple' and 'int'

报错信息如上

@blueset
Copy link
Member

blueset commented Jan 11, 2018

请检查并更新您的 Pillow 安装。

@thedogb
Copy link
Author

thedogb commented Jan 11, 2018

>>> PIL.VERSION
'1.1.7'
>>> PIL.PILLOW_VERSION
'5.0.0'

这是我环境中的pillow版本,需要哪个版本?我是用

pip install Pillow

安装的,也试过

pip install Pillow -U

都提示已升级到最高版本

@blueset
Copy link
Member

blueset commented Jan 11, 2018

能否告知发送的哪个贴纸包的哪个贴纸呢?

@thedogb
Copy link
Author

thedogb commented Jan 11, 2018

我试了Gabriel DropOut 和DuAnG都不行,自定义的图片可以成功发送

@blueset
Copy link
Member

blueset commented Jan 11, 2018

呃……
贴纸包的地址可以提供一下吗?
https://t.me/addstickers/ 开头的

@thedogb
Copy link
Author

thedogb commented Jan 11, 2018

@blueset
Copy link
Member

blueset commented Jan 11, 2018

初步确定可能是 Pillow 的问题, 已汇报给 python-pillow/Pillow

@thedogb
Copy link
Author

thedogb commented Jan 11, 2018

ok

@blueset blueset closed this as completed Jan 11, 2018
@thedogb
Copy link
Author

thedogb commented Jan 13, 2018

等了几天不见pillow修复,刚才试了以下,在requirements.txt中,降低Pillow的版本,重新装一下就可以正常发贴纸了。

moviepy
peewee
pydub
requests
python_telegram_bot>=5.3
xmltodict
Pillow<5.0.0
python_magic
itchat>=1.2.24
python-daemon
pyqrcode
(wechatToTelegram) 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants