{"action":"created","issue":{"url":"https://api.github.com/repos/blueset/ehForwarderBot/issues/1","repository_url":"https://api.github.com/repos/blueset/ehForwarderBot","labels_url":"https://api.github.com/repos/blueset/ehForwarderBot/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/blueset/ehForwarderBot/issues/1/comments","events_url":"https://api.github.com/repos/blueset/ehForwarderBot/issues/1/events","html_url":"https://github.com/blueset/ehForwarderBot/issues/1","id":197017712,"number":1,"title":"SyntaxError when running the bot","user":{"login":"mikelei8291","id":9620335,"avatar_url":"https://avatars.githubusercontent.com/u/9620335?v=3","gravatar_id":"","url":"https://api.github.com/users/mikelei8291","html_url":"https://github.com/mikelei8291","followers_url":"https://api.github.com/users/mikelei8291/followers","following_url":"https://api.github.com/users/mikelei8291/following{/other_user}","gists_url":"https://api.github.com/users/mikelei8291/gists{/gist_id}","starred_url":"https://api.github.com/users/mikelei8291/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikelei8291/subscriptions","organizations_url":"https://api.github.com/users/mikelei8291/orgs","repos_url":"https://api.github.com/users/mikelei8291/repos","events_url":"https://api.github.com/users/mikelei8291/events{/privacy}","received_events_url":"https://api.github.com/users/mikelei8291/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-12-21T19:49:04Z","updated_at":"2016-12-23T06:20:45Z","closed_at":"2016-12-23T03:43:47Z","body":"When I tried to run the bot, I got the error below:\r\n```\r\nTraceback (most recent call last):\r\n  File \"main.py\", line 107, in <module>\r\n    init()\r\n  File \"main.py\", line 60, in init\r\n    obj = getattr(__import__(i[0], fromlist=i[1]), i[1])\r\n  File \"/root/github/ehForwarderBot/plugins/eh_wechat_slave.py\", line 413\r\n    txt = txt.format({**msg['Text'], **msg['Text']['userInfo']})\r\n                       ^\r\nSyntaxError: invalid syntax\r\n```\r\n\r\nThen I just deleted the `**` before the `msg` in the inner dict and the bot ran properly.\r\n\r\n---\r\nAlso, it seems that photos and files cannot be sent at this moment, not sure if it is caused by the editing of the code."},"comment":{"url":"https://api.github.com/repos/blueset/ehForwarderBot/issues/comments/268945822","html_url":"https://github.com/blueset/ehForwarderBot/issues/1#issuecomment-268945822","issue_url":"https://api.github.com/repos/blueset/ehForwarderBot/issues/1","id":268945822,"user":{"login":"mikelei8291","id":9620335,"avatar_url":"https://avatars.githubusercontent.com/u/9620335?v=3","gravatar_id":"","url":"https://api.github.com/users/mikelei8291","html_url":"https://github.com/mikelei8291","followers_url":"https://api.github.com/users/mikelei8291/followers","following_url":"https://api.github.com/users/mikelei8291/following{/other_user}","gists_url":"https://api.github.com/users/mikelei8291/gists{/gist_id}","starred_url":"https://api.github.com/users/mikelei8291/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikelei8291/subscriptions","organizations_url":"https://api.github.com/users/mikelei8291/orgs","repos_url":"https://api.github.com/users/mikelei8291/repos","events_url":"https://api.github.com/users/mikelei8291/events{/privacy}","received_events_url":"https://api.github.com/users/mikelei8291/received_events","type":"User","site_admin":false},"created_at":"2016-12-23T06:20:45Z","updated_at":"2016-12-23T06:20:45Z","body":"Issue 1: fixed by upgrading Python version form 3.4.6 to 3.5.2\r\n\r\n---\r\nIssue 2:\r\nlog cat:\r\n```\r\n Processing Update: {'update_id': 161106361, 'message': {'new_chat_photo': [], 'date': 1482473045, 'migrate_to_chat_id': 0, 'migrate_from_chat_id': 0, 'delete_chat_photo': False, 'caption': '', 'group_chat_created': False, 'photo': [{'file_size': 1215, 'height': 60, 'file_id': 'AgADBQADtcIxG4WvdQaEG219aYqctZMsyjIABEDcQbq3WOWosUQBAAEC', 'width': 90}, {'file_size': 17407, 'height': 213, 'file_id': 'AgADBQADtcIxG4WvdQaEG219aYqctZMsyjIABD_cgU2c1ol9skQBAAEC', 'width': 320}, {'file_size': 81210, 'height': 533, 'file_id': 'AgADBQADtcIxG4WvdQaEG219aYqctZMsyjIABFvO99kUSZw_s0QBAAEC', 'width': 800}, {'file_size': 129919, 'height': 853, 'file_id': 'AgADBQADtcIxG4WvdQaEG219aYqctZMsyjIABD_BFhZ4mlohsEQBAAEC', 'width': 1280}], 'supergroup_chat_created': False, 'chat': {'all_members_are_admins': False, 'title': '', 'username': 'MikeLei', 'last_name': 'Lei', 'first_name': 'Mike', 'type': 'private', 'id': 000000000}, 'message_id': 178, 'channel_chat_created': False, 'entities': [], 'from': {'type': '', 'username': 'MikeLei', 'first_name': 'Mike', 'last_name': 'Lei', 'id': 000000000}, 'reply_to_message': {'new_chat_photo': [], 'date': 1482472992, 'migrate_to_chat_id': 0, 'migrate_from_chat_id': 0, 'delete_chat_photo': False, 'caption': '', 'new_chat_title': '', 'group_chat_created': False, 'photo': [], 'supergroup_chat_created': False, 'chat': {'all_members_are_admins': False, 'title': '', 'username': 'MikeLei', 'last_name': 'Lei', 'first_name': 'Mike', 'type': 'private', 'id': 000000000}, 'message_id': 177, 'channel_chat_created': False, 'entities': [], 'from': {'type': '', 'username': 'Bot', 'first_name': \"Bot\", 'last_name': '', 'id': 000000000}, 'edit_date': 1482473013, 'text': \"Reply to this message to chat with 'Mike' from '💬 WeChat Slave'.\"}, 'new_chat_title': '', 'text': ''}}\r\n2016-12-23 14:04:06,160 - masterTG.plugins.eh_telegram_master - DEBUG\r\n ----\r\nMsg from tg user:\r\n{'new_chat_photo': [], 'date': 1482473045, 'migrate_to_chat_id': 0, 'migrate_from_chat_id': 0, 'delete_chat_photo': False, 'caption': '', 'group_chat_created': False, 'photo': [{'file_size': 1215, 'height': 60, 'file_id': 'AgADBQADtcIxG4WvdQaEG219aYqctZMsyjIABEDcQbq3WOWosUQBAAEC', 'width': 90}, {'file_size': 17407, 'height': 213, 'file_id': 'AgADBQADtcIxG4WvdQaEG219aYqctZMsyjIABD_cgU2c1ol9skQBAAEC', 'width': 320}, {'file_size': 81210, 'height': 533, 'file_id': 'AgADBQADtcIxG4WvdQaEG219aYqctZMsyjIABFvO99kUSZw_s0QBAAEC', 'width': 800}, {'file_size': 129919, 'height': 853, 'file_id': 'AgADBQADtcIxG4WvdQaEG219aYqctZMsyjIABD_BFhZ4mlohsEQBAAEC', 'width': 1280}], 'supergroup_chat_created': False, 'chat': {'all_members_are_admins': False, 'title': '', 'username': 'MikeLei', 'last_name': 'Lei', 'first_name': 'Mike', 'type': 'private', 'id': 000000000}, 'message_id': 178, 'channel_chat_created': False, 'entities': [], 'from': {'type': '', 'username': 'MikeLei', 'first_name': 'Mike', 'last_name': 'Lei', 'id': 000000000}, 'reply_to_message': {'new_chat_photo': [], 'date': 1482472992, 'migrate_to_chat_id': 0, 'migrate_from_chat_id': 0, 'delete_chat_photo': False, 'caption': '', 'new_chat_title': '', 'group_chat_created': False, 'photo': [], 'supergroup_chat_created': False, 'chat': {'all_members_are_admins': False, 'title': '', 'username': 'MikeLei', 'last_name': 'Lei', 'first_name': 'Mike', 'type': 'private', 'id': 000000000}, 'message_id': 177, 'channel_chat_created': False, 'entities': [], 'from': {'type': '', 'username': 'Bot', 'first_name': \"Bot\", 'last_name': '', 'id': 000000000}, 'edit_date': 1482473013, 'text': \"Reply to this message to chat with 'Mike' from '💬 WeChat Slave'.\"}, 'new_chat_title': '', 'text': ''}\r\n2016-12-23 14:04:06,160 - masterTG.db.plugins.eh_telegram_master.db - INFO\r\n get_msg_log 000000000.177\r\n2016-12-23 14:04:06,161 - peewee - DEBUG\r\n ('SELECT \"t1\".\"master_msg_id\", \"t1\".\"text\", \"t1\".\"slave_origin_uid\", \"t1\".\"slave_origin_display_name\", \"t1\".\"slave_member_uid\", \"t1\".\"slave_member_display_name\", \"t1\".\"msg_type\", \"t1\".\"sent_to\", \"t1\".\"time\" FROM \"msglog\" AS t1 WHERE (\"t1\".\"master_msg_id\" = ?) ORDER BY \"t1\".\"time\" DESC', ['000000000.177'])\r\n2016-12-23 14:04:06,161 - masterTG.plugins.eh_telegram_master - DEBUG\r\n tg: msg type: Photo\r\n2016-12-23 14:04:06,161 - telegram.bot - DEBUG\r\n Entering: getFile\r\n2016-12-23 14:04:07,741 - telegram.bot - DEBUG\r\n {'file_size': 129919, 'file_path': 'https://api.telegram.org/file/bot000000000:ohWDxoegtMHetaanRykA0OxSVOENplz1AHL/photo/file_39.jpg', 'file_id': 'AgADBQADtcIxG4WvdQaEG219aYqctZMsyjIABD_BFhZ4mlohsEQBAAEC'}\r\n2016-12-23 14:04:07,741 - telegram.bot - DEBUG\r\n Exiting: getFile\r\n2016-12-23 14:04:08,770 - SlaveWC.plugins.eh_wechat_slave - INFO\r\n msg.text\r\n2016-12-23 14:04:08,783 - requests.packages.urllib3.connectionpool - INFO\r\n Resetting dropped connection: wx.qq.com\r\n2016-12-23 14:04:09,208 - requests.packages.urllib3.connectionpool - DEBUG\r\n \"POST /cgi-bin/mmwebwx-bin/webwxbatchgetcontact?type=ex&r=1482473048 HTTP/1.1\" 200 884\r\n2016-12-23 14:04:09,824 - requests.packages.urllib3.connectionpool - DEBUG\r\n \"GET /cgi-bin/mmwebwx-bin/webwxgetcontact?r=1482473049&seq=0&skey=@crypt_4b0fa9a4_c376da800738cf9ffccabb173aaa84e0 HTTP/1.1\" 200 14112\r\n2016-12-23 14:04:10,530 - requests.packages.urllib3.connectionpool - DEBUG\r\n \"GET /cgi-bin/mmwebwx-bin/webwxgetcontact?r=1482473049&seq=0&skey=@crypt_4b0fa9a4_c376da800738cf9ffccabb173aaa84e0 HTTP/1.1\" 200 14112\r\n2016-12-23 14:04:11,237 - requests.packages.urllib3.connectionpool - DEBUG\r\n \"GET /cgi-bin/mmwebwx-bin/webwxgetcontact?r=1482473050&seq=0&skey=@crypt_4b0fa9a4_c376da800738cf9ffccabb173aaa84e0 HTTP/1.1\" 200 14112\r\n2016-12-23 14:04:11,384 - requests.packages.urllib3.connectionpool - DEBUG\r\n \"POST /cgi-bin/mmwebwx-bin/webwxbatchgetcontact?type=ex&r=1482473051 HTTP/1.1\" 200 884\r\n2016-12-23 14:04:11,385 - SlaveWC.plugins.eh_wechat_slave - INFO\r\n Sending message to Wechat:\r\nTarget-------\r\nuid: wxid_3otynddtc8vc21\r\nUserName: False\r\nNickName:\r\n2016-12-23 14:04:11,385 - SlaveWC.plugins.eh_wechat_slave - INFO\r\n Got message of type Image\r\n2016-12-23 14:04:11,385 - SlaveWC.plugins.eh_wechat_slave - INFO\r\n Image/Sticker Image\r\n2016-12-23 14:04:11,386 - SlaveWC.plugins.eh_wechat_slave - INFO\r\n Sending Image...\r\n2016-12-23 14:04:11,389 - requests.packages.urllib3.connectionpool - INFO\r\n Resetting dropped connection: file.wx.qq.com\r\n2016-12-23 14:04:12,487 - requests.packages.urllib3.connectionpool - DEBUG\r\n \"POST /cgi-bin/mmwebwx-bin/webwxuploadmedia?f=json HTTP/1.1\" 200 789\r\n2016-12-23 14:04:12,624 - requests.packages.urllib3.connectionpool - DEBUG\r\n \"POST /cgi-bin/mmwebwx-bin/webwxsendmsgimg?fun=async&f=json HTTP/1.1\" 200 77\r\n2016-12-23 14:04:12,626 - SlaveWC.plugins.eh_wechat_slave - INFO\r\n Image sent with result {'LocalID': '', 'BaseResponse': {'ErrMsg': '', 'RawMsg': '', 'Ret': -1}, 'MsgID': ''}\r\n```\r\n\r\nIDs are replaced by 000000000, and bot username is edited."}}
{"actor":{"display_login":"mikelei8291"}}