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

不能往微信发送图片 #16

Closed
ipcjs opened this issue Feb 25, 2018 · 4 comments
Closed

不能往微信发送图片 #16

ipcjs opened this issue Feb 25, 2018 · 4 comments

Comments

@ipcjs
Copy link

ipcjs commented Feb 25, 2018

版本信息

EH Forwarder Bot
Version: 2.0.0b10
Python version:
3.6.3 (default, Oct 3 2017, 21:45:48)
[GCC 7.2.0]

Master channel:
Telegram Master (blueset.telegram) 2.0.0b9 # Default profile

Slave channel:
WeChat Slave (blueset.wechat) 2.0.0a11

Middlewares:
No middleware is enabled.

问题描述

在Telegram中往微信发送图片,服务器报错,微信上不能接收到图片。
文字可以正常收/发。
可以接收微信上发送过来的图片。

重现步骤

在聊天bot里选择一条消息回复,发送一张图片。
微信上并不能接收到图片。
查看服务端log,打印了一段错误信息(如下)

Verbose 日志

Verbose 日志
2018-02-25 11:09:30,537 [DEBUG]: efb_telegram_master.bot_manager (bot_manager.retry_on_timeout; bot_manager.py:44) 
    Trying to call <function TelegramBotManager.send_message at 0x7f26cece91e0> with infinite retry.
2018-02-25 11:09:30,538 [DEBUG]: efb_telegram_master.bot_manager (bot_manager.retry_on_timeout; bot_manager.py:44) 
    Trying to call <function TelegramBotManager.edit_message_text at 0x7f26d26bf048> with infinite retry.
2018-02-25 11:09:30,538 [DEBUG]: efb_telegram_master.bot_manager (bot_manager.retry_on_timeout; bot_manager.py:44) 
    Trying to call <function TelegramBotManager.caption_affix_decorator.<locals>.caption_affix at 0x7f26cece96a8> with infinite retry.
2018-02-25 11:09:30,538 [DEBUG]: efb_telegram_master.bot_manager (bot_manager.retry_on_timeout; bot_manager.py:44) 
    Trying to call <function TelegramBotManager.caption_affix_decorator.<locals>.caption_affix at 0x7f26cece9840> with infinite retry.
2018-02-25 11:09:30,538 [DEBUG]: efb_telegram_master.bot_manager (bot_manager.retry_on_timeout; bot_manager.py:44) 
    Trying to call <function TelegramBotManager.caption_affix_decorator.<locals>.caption_affix at 0x7f26cece99d8> with infinite retry.
2018-02-25 11:09:30,538 [DEBUG]: efb_telegram_master.bot_manager (bot_manager.retry_on_timeout; bot_manager.py:44) 
    Trying to call <function TelegramBotManager.caption_affix_decorator.<locals>.caption_affix at 0x7f26cece9b70> with infinite retry.
2018-02-25 11:09:30,538 [DEBUG]: efb_telegram_master.bot_manager (bot_manager.retry_on_timeout; bot_manager.py:44) 
    Trying to call <function TelegramBotManager.caption_affix_decorator.<locals>.caption_affix at 0x7f26cece9d08> with infinite retry.
2018-02-25 11:09:30,538 [DEBUG]: efb_telegram_master.bot_manager (bot_manager.retry_on_timeout; bot_manager.py:44) 
    Trying to call <function TelegramBotManager.caption_affix_decorator.<locals>.caption_affix at 0x7f26cece9ea0> with infinite retry.
2018-02-25 11:09:30,538 [DEBUG]: efb_telegram_master.bot_manager (bot_manager.retry_on_timeout; bot_manager.py:44) 
    Trying to call <function TelegramBotManager.send_chat_action at 0x7f26cece9f28> with infinite retry.
2018-02-25 11:09:30,538 [DEBUG]: efb_telegram_master.bot_manager (bot_manager.retry_on_timeout; bot_manager.py:44) 
    Trying to call <function TelegramBotManager.send_venue at 0x7f26cecec0d0> with infinite retry.
2018-02-25 11:09:30,538 [DEBUG]: efb_telegram_master.bot_manager (bot_manager.retry_on_timeout; bot_manager.py:44) 
    Trying to call <function TelegramBotManager.get_me at 0x7f26cecec1e0> with infinite retry.
2018-02-25 11:09:30,538 [DEBUG]: efb_telegram_master.bot_manager (bot_manager.retry_on_timeout; bot_manager.py:44) 
    Trying to call <function TelegramBotManager.caption_affix_decorator.<locals>.caption_affix at 0x7f26cecec488> with infinite retry.
2018-02-25 11:09:30,538 [DEBUG]: efb_telegram_master.bot_manager (bot_manager.retry_on_timeout; bot_manager.py:44) 
    Trying to call <function TelegramBotManager.get_file at 0x7f26cecec620> with infinite retry.
2018-02-25 11:09:30,538 [DEBUG]: efb_telegram_master.bot_manager (bot_manager.retry_on_timeout; bot_manager.py:44) 
    Trying to call <function TelegramBotManager.delete_message at 0x7f26cecec6a8> with infinite retry.
█
2018-02-25 11:09:30,903 [Level 99]: ehforwarderbot.__main__ (__main__.init; __main__.py:77) 
    �[0;37;46m Initializing slave blueset.wechat... �[0m
2018-02-25 11:09:32,201 [DEBUG]: efb_wechat_slave.wxpy.api.bot (misc.start_new_thread; misc.py:421) 
    new thread: _listen
2018-02-25 11:09:32,204 [INFO]: efb_wechat_slave.wxpy.api.bot (bot._listen; bot.py:498) 
    <Bot: ipcjs>: started
2018-02-25 11:09:32,207 [INFO]: efb_wechat_slave.wxpy.api.messages.message_config (message_config.enabled; message_config.py:47) 
    <MessageConfig: ipcjs: thread_wrapper (Enabled, Async)>
2018-02-25 11:09:32,208 [INFO]: efb_wechat_slave.wxpy.api.messages.message_config (message_config.enabled; message_config.py:47) 
    <MessageConfig: ipcjs: wechat_sharing_msg (Enabled, Async)>
2018-02-25 11:09:32,208 [INFO]: efb_wechat_slave.wxpy.api.messages.message_config (message_config.enabled; message_config.py:47) 
    <MessageConfig: ipcjs: thread_wrapper (Enabled, Async)>
2018-02-25 11:09:32,208 [INFO]: efb_wechat_slave.wxpy.api.messages.message_config (message_config.enabled; message_config.py:47) 
    <MessageConfig: ipcjs: thread_wrapper (Enabled, Async)>
2018-02-25 11:09:32,208 [INFO]: efb_wechat_slave.wxpy.api.messages.message_config (message_config.enabled; message_config.py:47) 
    <MessageConfig: ipcjs: thread_wrapper (Enabled, Async)>
2018-02-25 11:09:32,208 [INFO]: efb_wechat_slave.wxpy.api.messages.message_config (message_config.enabled; message_config.py:47) 
    <MessageConfig: ipcjs: thread_wrapper (Enabled, Async)>
2018-02-25 11:09:32,208 [INFO]: efb_wechat_slave.wxpy.api.messages.message_config (message_config.enabled; message_config.py:47) 
    <MessageConfig: ipcjs: thread_wrapper (Enabled, Async)>
2018-02-25 11:09:32,208 [INFO]: efb_wechat_slave.wxpy.api.messages.message_config (message_config.enabled; message_config.py:47) 
    <MessageConfig: ipcjs: thread_wrapper (Enabled, Async)>
2018-02-25 11:09:32,209 [INFO]: efb_wechat_slave.wxpy.api.messages.message_config (message_config.enabled; message_config.py:47) 
    <MessageConfig: ipcjs: thread_wrapper (Enabled, Async)>
2018-02-25 11:09:32,209 [INFO]: efb_wechat_slave.wxpy.api.messages.message_config (message_config.enabled; message_config.py:47) 
    <MessageConfig: ipcjs: thread_wrapper (Enabled, Async)>
2018-02-25 11:09:32,209 [INFO]: efb_wechat_slave.wxpy.api.messages.message_config (message_config.enabled; message_config.py:47) 
    <MessageConfig: ipcjs: wc_msg_system_log (Enabled, Async)>
2018-02-25 11:09:32,209 [Level 99]: ehforwarderbot.__main__ (__main__.init; __main__.py:87) 
    �[0;37;42m Slave channel WeChat Slave (blueset.wechat) # None is initialized. �[0m
2018-02-25 11:09:32,209 [Level 99]: ehforwarderbot.__main__ (__main__.init; __main__.py:90) 
    �[0;37;46m Initializing master blueset.telegram... �[0m
2018-02-25 11:09:32,212 [DEBUG]: PIL.Image (Image.init; Image.py:405) 
    Importing BmpImagePlugin
2018-02-25 11:09:32,215 [DEBUG]: PIL.Image (Image.init; Image.py:405) 
    Importing BufrStubImagePlugin
2018-02-25 11:09:32,216 [DEBUG]: PIL.Image (Image.init; Image.py:405) 
    Importing CurImagePlugin
2018-02-25 11:09:32,216 [DEBUG]: PIL.Image (Image.init; Image.py:405) 
    Importing DcxImagePlugin
2018-02-25 11:09:32,217 [DEBUG]: PIL.Image (Image.init; Image.py:405) 
    Importing DdsImagePlugin
2018-02-25 11:09:32,217 [DEBUG]: PIL.Image (Image.init; Image.py:405) 
    Importing EpsImagePlugin
2018-02-25 11:09:32,218 [DEBUG]: PIL.Image (Image.init; Image.py:405) 
    Importing FitsStubImagePlugin
2018-02-25 11:09:32,219 [DEBUG]: PIL.Image (Image.init; Image.py:405) 
    Importing FliImagePlugin
2018-02-25 11:09:32,219 [DEBUG]: PIL.Image (Image.init; Image.py:405) 
    Importing FpxImagePlugin
2018-02-25 11:09:32,220 [DEBUG]: PIL.Image (Image.init; Image.py:408) 
    Image: failed to import FpxImagePlugin: No module named 'olefile'
2018-02-25 11:09:32,220 [DEBUG]: PIL.Image (Image.init; Image.py:405) 
    Importing FtexImagePlugin
2018-02-25 11:09:32,220 [DEBUG]: PIL.Image (Image.init; Image.py:405) 
    Importing GbrImagePlugin
2018-02-25 11:09:32,220 [DEBUG]: PIL.Image (Image.init; Image.py:405) 
    Importing GifImagePlugin
2018-02-25 11:09:32,223 [DEBUG]: PIL.Image (Image.init; Image.py:405) 
    Importing GribStubImagePlugin
2018-02-25 11:09:32,223 [DEBUG]: PIL.Image (Image.init; Image.py:405) 
    Importing Hdf5StubImagePlugin
2018-02-25 11:09:32,224 [DEBUG]: PIL.Image (Image.init; Image.py:405) 
    Importing IcnsImagePlugin
2018-02-25 11:09:32,226 [DEBUG]: PIL.Image (Image.init; Image.py:405) 
    Importing IcoImagePlugin
2018-02-25 11:09:32,226 [DEBUG]: PIL.Image (Image.init; Image.py:405) 
    Importing ImImagePlugin
2018-02-25 11:09:32,227 [DEBUG]: PIL.Image (Image.init; Image.py:405) 
    Importing ImtImagePlugin
2018-02-25 11:09:32,228 [DEBUG]: PIL.Image (Image.init; Image.py:405) 
    Importing IptcImagePlugin
2018-02-25 11:09:32,228 [DEBUG]: PIL.Image (Image.init; Image.py:405) 
    Importing JpegImagePlugin
2018-02-25 11:09:32,235 [DEBUG]: PIL.Image (Image.init; Image.py:405) 
    Importing Jpeg2KImagePlugin
2018-02-25 11:09:32,235 [DEBUG]: PIL.Image (Image.init; Image.py:405) 
    Importing McIdasImagePlugin
2018-02-25 11:09:32,235 [DEBUG]: PIL.Image (Image.init; Image.py:405) 
    Importing MicImagePlugin
2018-02-25 11:09:32,236 [DEBUG]: PIL.Image (Image.init; Image.py:408) 
    Image: failed to import MicImagePlugin: No module named 'olefile'
2018-02-25 11:09:32,236 [DEBUG]: PIL.Image (Image.init; Image.py:405) 
    Importing MpegImagePlugin
2018-02-25 11:09:32,236 [DEBUG]: PIL.Image (Image.init; Image.py:405) 
    Importing MpoImagePlugin
2018-02-25 11:09:32,237 [DEBUG]: PIL.Image (Image.init; Image.py:405) 
    Importing MspImagePlugin
2018-02-25 11:09:32,237 [DEBUG]: PIL.Image (Image.init; Image.py:405) 
    Importing PalmImagePlugin
2018-02-25 11:09:32,238 [DEBUG]: PIL.Image (Image.init; Image.py:405) 
    Importing PcdImagePlugin
2018-02-25 11:09:32,239 [DEBUG]: PIL.Image (Image.init; Image.py:405) 
    Importing PcxImagePlugin
2018-02-25 11:09:32,239 [DEBUG]: PIL.Image (Image.init; Image.py:405) 
    Importing PdfImagePlugin
2018-02-25 11:09:32,240 [DEBUG]: PIL.Image (Image.init; Image.py:405) 
    Importing PixarImagePlugin
2018-02-25 11:09:32,240 [DEBUG]: PIL.Image (Image.init; Image.py:405) 
    Importing PngImagePlugin
2018-02-25 11:09:32,241 [DEBUG]: PIL.Image (Image.init; Image.py:405) 
    Importing PpmImagePlugin
2018-02-25 11:09:32,241 [DEBUG]: PIL.Image (Image.init; Image.py:405) 
    Importing PsdImagePlugin
2018-02-25 11:09:32,242 [DEBUG]: PIL.Image (Image.init; Image.py:405) 
    Importing SgiImagePlugin
2018-02-25 11:09:32,242 [DEBUG]: PIL.Image (Image.init; Image.py:405) 
    Importing SpiderImagePlugin
2018-02-25 11:09:32,242 [DEBUG]: PIL.Image (Image.init; Image.py:405) 
    Importing SunImagePlugin
2018-02-25 11:09:32,243 [DEBUG]: PIL.Image (Image.init; Image.py:405) 
    Importing TgaImagePlugin
2018-02-25 11:09:32,243 [DEBUG]: PIL.Image (Image.init; Image.py:405) 
    Importing TiffImagePlugin
2018-02-25 11:09:32,243 [DEBUG]: PIL.Image (Image.init; Image.py:405) 
    Importing WebPImagePlugin
2018-02-25 11:09:32,245 [DEBUG]: PIL.Image (Image.init; Image.py:405) 
    Importing WmfImagePlugin
2018-02-25 11:09:32,245 [DEBUG]: PIL.Image (Image.init; Image.py:405) 
    Importing XbmImagePlugin
2018-02-25 11:09:32,246 [DEBUG]: PIL.Image (Image.init; Image.py:405) 
    Importing XpmImagePlugin
2018-02-25 11:09:32,247 [DEBUG]: PIL.Image (Image.init; Image.py:405) 
    Importing XVThumbImagePlugin
2018-02-25 11:09:32,254 [DEBUG]: peewee (peewee.execute_sql; peewee.py:2480) 
    ('SELECT name FROM sqlite_master WHERE type = ? ORDER BY name;', ('table',))
2018-02-25 11:09:32,255 [DEBUG]: telegram.ext.dispatcher (dispatcher._set_singleton; dispatcher.py:131) 
    Setting singleton dispatcher as <telegram.ext.dispatcher.Dispatcher object at 0x7f26d3016be0>
2018-02-25 11:09:33,269 [Level 99]: ehforwarderbot.__main__ (__main__.init; __main__.py:99) 
    �[0;37;42m Master channel Telegram Master (blueset.telegram) # None is initialized. �[0m
2018-02-25 11:09:33,269 [Level 99]: ehforwarderbot.__main__ (__main__.init; __main__.py:101) 
    �[1;37;42m All channels initialized. �[0m
2018-02-25 11:09:33,269 [Level 99]: ehforwarderbot.__main__ (__main__.init; __main__.py:114) 
    �[1;37;42m All middlewares are initialized. �[0m
2018-02-25 11:09:33,270 [DEBUG]: JobQueue (jobqueue.start; jobqueue.py:309) 
    JobQueue thread started
2018-02-25 11:09:33,270 [DEBUG]: telegram.ext.updater (updater._thread_wrapper; updater.py:147) 
    dispatcher - started
2018-02-25 11:09:33,271 [DEBUG]: telegram.ext.updater (updater._thread_wrapper; updater.py:147) 
    updater - started
2018-02-25 11:09:33,271 [DEBUG]: telegram.ext.updater (updater._start_polling; updater.py:276) 
    Updater thread started
2018-02-25 11:09:33,273 [DEBUG]: telegram.ext.dispatcher (dispatcher.start; dispatcher.py:209) 
    Dispatcher started
2018-02-25 11:09:40,030 [DEBUG]: telegram.ext.dispatcher (dispatcher.start; dispatcher.py:227) 
    Processing Update: {'update_id': 667200427, 'message': {'message_id': 96, 'date': 1519556979, 'chat': {'id': -233487688, 'type': 'group', 'title': '你修改群名为.wechat', 'all_members_are_administrators': True}, 'entities': [], 'caption_entities': [], 'photo': [{'file_id': 'AgADBQADDagxG9CnmFQXjfLqNs4kzy260zIABD42WUZY94SagfcAAgI', 'width': 45, 'height': 90, 'file_size': 1083}, {'file_id': 'AgADBQADDagxG9CnmFQXjfLqNs4kzy260zIABDKj-DP9-w21gvcAAgI', 'width': 160, 'height': 320, 'file_size': 11686}, {'file_id': 'AgADBQADDagxG9CnmFQXjfLqNs4kzy260zIABHSDtmXs04Bqg_cAAgI', 'width': 400, 'height': 800, 'file_size': 46348}, {'file_id': 'AgADBQADDagxG9CnmFQXjfLqNs4kzy260zIABD2SNgGKLfujgPcAAgI', 'width': 640, 'height': 1280, 'file_size': 72816}], 'new_chat_members': [], 'new_chat_photo': [], 'delete_chat_photo': False, 'group_chat_created': False, 'supergroup_chat_created': False, 'channel_chat_created': False, 'from': {'id': 377732820, 'first_name': 'ipcjs', 'is_bot': False, 'last_name': 'Jiang', 'username': 'ipcjs', 'language_code': 'en-us'}, 'new_chat_member': None}}
2018-02-25 11:09:40,031 [DEBUG]: efb_telegram_master.locale_handler (locale_handler.check_update; locale_handler.py:36) 
    [667200427] Update has language en-us.
2018-02-25 11:09:40,031 [INFO]: efb_telegram_master.locale_handler (locale_handler.check_update; locale_handler.py:46) 
    Updating locale to en_US
2018-02-25 11:09:40,032 [DEBUG]: efb_telegram_master.master_message (master_message.msg; master_message.py:84) 
    Received message from Telegram: {'message_id': 96, 'date': 1519556979, 'chat': {'id': -233487688, 'type': 'group', 'title': '你修改群名为.wechat', 'all_members_are_administrators': True}, 'entities': [], 'caption_entities': [], 'photo': [{'file_id': 'AgADBQADDagxG9CnmFQXjfLqNs4kzy260zIABD42WUZY94SagfcAAgI', 'width': 45, 'height': 90, 'file_size': 1083}, {'file_id': 'AgADBQADDagxG9CnmFQXjfLqNs4kzy260zIABDKj-DP9-w21gvcAAgI', 'width': 160, 'height': 320, 'file_size': 11686}, {'file_id': 'AgADBQADDagxG9CnmFQXjfLqNs4kzy260zIABHSDtmXs04Bqg_cAAgI', 'width': 400, 'height': 800, 'file_size': 46348}, {'file_id': 'AgADBQADDagxG9CnmFQXjfLqNs4kzy260zIABD2SNgGKLfujgPcAAgI', 'width': 640, 'height': 1280, 'file_size': 72816}], 'new_chat_members': [], 'new_chat_photo': [], 'delete_chat_photo': False, 'group_chat_created': False, 'supergroup_chat_created': False, 'channel_chat_created': False, 'from': {'id': 377732820, 'first_name': 'ipcjs', 'is_bot': False, 'last_name': 'Jiang', 'username': 'ipcjs', 'language_code': 'en-us'}, 'new_chat_member': None}
2018-02-25 11:09:40,032 [DEBUG]: peewee (peewee.execute_sql; peewee.py:2480) 
    ('SELECT "t1"."id", "t1"."master_uid", "t1"."slave_uid" FROM "chatassoc" AS "t1" WHERE ("t1"."master_uid" = ?)', ['blueset.telegram -233487688'])
2018-02-25 11:09:40,033 [DEBUG]: efb_telegram_master.master_message (master_message.process_telegram_message; master_message.py:142) 
    [-233487688.96] Message is edited: False, None
2018-02-25 11:09:40,034 [DEBUG]: peewee (peewee.execute_sql; peewee.py:2480) 
    ('SELECT "t1"."id", "t1"."master_uid", "t1"."slave_uid" FROM "chatassoc" AS "t1" WHERE ("t1"."master_uid" = ?)', ['blueset.telegram -233487688'])
2018-02-25 11:09:40,034 [DEBUG]: efb_telegram_master.master_message (master_message.process_telegram_message; master_message.py:218) 
    [-233487688.96] Telegram received. From private chat: False; Group has multiple linked chats: False; Message replied to another message: False
2018-02-25 11:09:40,034 [DEBUG]: efb_telegram_master.master_message (master_message.process_telegram_message; master_message.py:219) 
    [-233487688.96] Destination chat = blueset.wechat 774f669c
2018-02-25 11:09:40,034 [DEBUG]: efb_telegram_master.master_message (master_message.process_telegram_message; master_message.py:256) 
    [-233487688.96] Message type from Telegram: Photo
2018-02-25 11:09:40,034 [DEBUG]: efb_telegram_master.master_message (master_message.process_telegram_message; master_message.py:260) 
    [-233487688.96] EFB message type: Photo
2018-02-25 11:09:40,035 [DEBUG]: peewee (peewee.execute_sql; peewee.py:2480) 
    ('INSERT INTO "msglog" ("master_msg_id", "slave_message_id", "text", "slave_origin_uid", "slave_origin_display_name", "slave_member_uid", "slave_member_display_name", "msg_type", "sent_to", "time") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)', ['-233487688.96', '__fail__.1519556980', 'Sent a MsgType.Image', 'blueset.wechat 774f669c', '__chat__', None, None, 'MsgType.Image', 'slave', datetime.datetime(2018, 2, 25, 11, 9, 40, 34626)])
2018-02-25 11:09:40,038 [ERROR]: telegram.ext.dispatcher (dispatcher.process_update; dispatcher.py:301) 
    An uncaught error was raised while processing the update
Traceback (most recent call last):
  File "/home/ubuntu/.local/lib/python3.6/site-packages/telegram/ext/dispatcher.py", line 279, in process_update
    handler.handle_update(update, self)
  File "/home/ubuntu/.local/lib/python3.6/site-packages/telegram/ext/messagehandler.py", line 169, in handle_update
    return self.callback(dispatcher.bot, update, **optional_args)
  File "/home/ubuntu/.local/lib/python3.6/site-packages/efb_telegram_master/master_message.py", line 70, in msg_thread_creator
    threading.Thread(target=self.msg, args=(bot, update)).run()
  File "/usr/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "/home/ubuntu/.local/lib/python3.6/site-packages/efb_telegram_master/master_message.py", line 108, in msg
    return self.process_telegram_message(bot, update)
  File "/home/ubuntu/.local/lib/python3.6/site-packages/efb_telegram_master/master_message.py", line 273, in process_telegram_message
    msg_md_text = message.text_markdown_urled
  File "/home/ubuntu/.local/lib/python3.6/site-packages/telegram/message.py", line 934, in text_markdown_urled
    return self._text_markdown(urled=True)
  File "/home/ubuntu/.local/lib/python3.6/site-packages/telegram/message.py", line 874, in _text_markdown
    message_text = message_text.encode('utf-16-le')
AttributeError: 'NoneType' object has no attribute 'encode'
@blueset
Copy link
Member

blueset commented Feb 26, 2018

已确认为 bug,将于下一版本修复。感谢汇报。

@blueset
Copy link
Member

blueset commented Mar 1, 2018

已于 blueset/efb-telegram-master/e7bb247 修复。

@blueset blueset closed this as completed Mar 1, 2018
@ipcjs
Copy link
Author

ipcjs commented Mar 1, 2018

更新了版本后,换了个错误。。。

版本

EH Forwarder Bot
Version: 2.0.0b10
Python version:
3.6.3 (default, Oct 3 2017, 21:45:48)
[GCC 7.2.0]

Master channel:
Telegram Master (blueset.telegram) 2.0.0b10 # Default profile

Slave channel:
WeChat Slave (blueset.wechat) 2.0.0a11

Middlewares:
No middleware is enabled.

日志

2018-03-01 11:44:31,133 [ERROR]: telegram.ext.dispatcher (dispatcher.process_update; dispatcher.py:301) 
    An uncaught error was raised while processing the update
Traceback (most recent call last):
  File "/home/ubuntu/.local/lib/python3.6/site-packages/telegram/ext/dispatcher.py", line 279, in process_update
    handler.handle_update(update, self)
  File "/home/ubuntu/.local/lib/python3.6/site-packages/telegram/ext/messagehandler.py", line 169, in handle_update
    return self.callback(dispatcher.bot, update, **optional_args)
  File "/home/ubuntu/.local/lib/python3.6/site-packages/efb_telegram_master/master_message.py", line 70, in msg_thread_creator
    threading.Thread(target=self.msg, args=(bot, update)).run()
  File "/usr/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "/home/ubuntu/.local/lib/python3.6/site-packages/efb_telegram_master/master_message.py", line 108, in msg
    return self.process_telegram_message(bot, update)
  File "/home/ubuntu/.local/lib/python3.6/site-packages/efb_telegram_master/master_message.py", line 274, in process_telegram_message
    if msg_md_text == escape_markdown(message.text):
  File "/home/ubuntu/.local/lib/python3.6/site-packages/telegram/utils/helpers.py", line 46, in escape_markdown
    return re.sub(r'([%s])' % escape_chars, r'\\\1', text)
  File "/usr/lib/python3.6/re.py", line 191, in sub
    return _compile(pattern, flags).sub(repl, string, count)
TypeError: expected string or bytes-like object

@blueset
Copy link
Member

blueset commented Mar 3, 2018

尝试于 blueset/efb-telegram-master/0f12787 修复。下一版本推送。

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

No branches or pull requests

2 participants