You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
使用被动回复接口时,抛出异常,比较奇怪的是有时出错,有时正常,是不是网络问题的锅?
代码如下: @itchatmp.msg_register(itchatmp.content.LINK) def linx_reply(msg): if u'红包' in msg['Title']: red_dict[msg['FromUserName']] = msg['Url'] #下面方法为向某网站api接口请求数据 conunt_left = connect_mtdhb.update_counts() return u'系统可用红包点数为 ' + str(conunt_left) + ',请输入红包密令'
异常日志如下: Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/tornado/web.py", line 1592, in _execute result = yield result File "/usr/local/lib/python3.6/site-packages/tornado/gen.py", line 1133, in run value = future.result() File "/usr/local/lib/python3.6/site-packages/tornado/gen.py", line 1141, in run yielded = self.gen.throw(*exc_info) File "/usr/local/lib/python3.6/site-packages/itchatmp/components/register.py", line 236, in post (rawReply, rawReply.get('ToUserName', ''))) File "/usr/local/lib/python3.6/site-packages/tornado/gen.py", line 1133, in run value = future.result() File "/usr/local/lib/python3.6/concurrent/futures/_base.py", line 425, in result return self.__get_result() File "/usr/local/lib/python3.6/concurrent/futures/_base.py", line 384, in __get_result raise self._exception File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run result = self.fn(*self.args, **self.kwargs) TypeError: send() missing 1 required positional argument: 'toUserName'
The text was updated successfully, but these errors were encountered:
使用被动回复接口时,抛出异常,比较奇怪的是有时出错,有时正常,是不是网络问题的锅?
代码如下:
@itchatmp.msg_register(itchatmp.content.LINK)
def linx_reply(msg):
if u'红包' in msg['Title']:
red_dict[msg['FromUserName']] = msg['Url']
#下面方法为向某网站api接口请求数据
conunt_left = connect_mtdhb.update_counts()
return u'系统可用红包点数为 ' + str(conunt_left) + ',请输入红包密令'
异常日志如下:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/tornado/web.py", line 1592, in _execute result = yield result
File "/usr/local/lib/python3.6/site-packages/tornado/gen.py", line 1133, in run value = future.result()
File "/usr/local/lib/python3.6/site-packages/tornado/gen.py", line 1141, in run yielded = self.gen.throw(*exc_info)
File "/usr/local/lib/python3.6/site-packages/itchatmp/components/register.py", line 236, in post (rawReply, rawReply.get('ToUserName', '')))
File "/usr/local/lib/python3.6/site-packages/tornado/gen.py", line 1133, in run value = future.result()
File "/usr/local/lib/python3.6/concurrent/futures/_base.py", line 425, in result return self.__get_result()
File "/usr/local/lib/python3.6/concurrent/futures/_base.py", line 384, in __get_result raise self._exception
File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run result = self.fn(*self.args, **self.kwargs)
TypeError: send() missing 1 required positional argument: 'toUserName'
The text was updated successfully, but these errors were encountered: