bgk_weixin_bot icon indicating copy to clipboard operation
bgk_weixin_bot copied to clipboard

KeyError: 'pass_ticket' 报错

Open zzhiyuann opened this issue 5 years ago • 1 comments

你好,扫码之后有这样的报错,请问如何解决?

Getting uuid of QR code.
Downloading QR code.
Please scan the QR code to log in.
Please press confirm on your phone.
Loading the contact, this may take a little while.
Traceback (most recent call last):
  File "wx.py", line 121, in <module>
    bot = Bot(cache_path=True)
  File "/Users/wang/opt/anaconda3/lib/python3.7/site-packages/wxpy/api/bot.py", line 86, in __init__
    loginCallback=login_callback, exitCallback=logout_callback
  File "/Users/wang/opt/anaconda3/lib/python3.7/site-packages/itchat/components/register.py", line 30, in auto_login
    loginCallback=loginCallback, exitCallback=exitCallback)
  File "/Users/wang/opt/anaconda3/lib/python3.7/site-packages/itchat/components/login.py", line 66, in login
    self.show_mobile_login()
  File "/Users/wang/opt/anaconda3/lib/python3.7/site-packages/itchat/components/login.py", line 212, in show_mobile_login
    self.loginInfo['url'], self.loginInfo['pass_ticket'])
KeyError: 'pass_ticket'

zzhiyuann avatar Feb 27 '20 06:02 zzhiyuann

大概率是你的微信号不支持web微信登录,貌似腾讯搞了个限制18年以后注册的微信号用不了web微信,你可以试下你的微信号能不能登录网页版微信,登录不了那就用不了了。。。或者你找些没限制的老号试试看。。。还有就是代码里的api key基本上都过期了,你可以去申请一个新的api key替换掉

AlpacaBi avatar Feb 27 '20 10:02 AlpacaBi