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

使用被动回复,抛出‘TypeError'异常 #50

Open
ShenKeeeew opened this issue Oct 15, 2018 · 1 comment
Open

使用被动回复,抛出‘TypeError'异常 #50

ShenKeeeew opened this issue Oct 15, 2018 · 1 comment

Comments

@ShenKeeeew
Copy link

ShenKeeeew commented Oct 15, 2018

使用被动回复接口时,抛出异常,比较奇怪的是有时出错,有时正常,是不是网络问题的锅?
代码如下:
@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'

@archerhu77
Copy link

去年10月都没人回复啊?我也是遇到类似错误,不知道如何解决,调试两天了

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

No branches or pull requests

2 participants