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

itchat.auto_login登录问题 #970

Open
252258606 opened this issue Oct 10, 2022 · 17 comments
Open

itchat.auto_login登录问题 #970

252258606 opened this issue Oct 10, 2022 · 17 comments

Comments

@252258606
Copy link

252258606 commented Oct 10, 2022

最近遇到一个问题,我需要用到itchat群发一个信息,但最近调用itchat.auto_login()时,微信扫码登录会延迟5秒,就这这个时间内会重新产生登录的二维码,登录不成功,发送不了信息

@LXHMH
Copy link

LXHMH commented Oct 10, 2022 via email

@1ighttack
Copy link

我也存在这样的问题,希望得到解决

@Medesol
Copy link

Medesol commented Nov 14, 2022

同样的问题

@heart5
Copy link

heart5 commented Dec 2, 2022

同样的问题也发生了。是一个非常用微信号。

@LXHMH
Copy link

LXHMH commented Dec 2, 2022 via email

@zhaohuiwei1990
Copy link

zhaohuiwei1990 commented Dec 2, 2022 via email

@lindalinya
Copy link

建议给login加一个延时reloading二维码的时间长度参数

@zhayujie
Copy link

我现在临时方案是在 itchat/components/login.py 的 login() 函数中,在进入 while not isLoggedIn 循环前加了一个sleep

image

期待能更新版本

@rankang666
Copy link

修改判断uuid代码可以解决问题
itchat_bug

@Stevendu666
Copy link

██████████████████ ████ ████ ██ ██████ ██████ ████ ██████ ██���█
██ ██ ██ ████ ████████ ████████ ██ ██ ██ ██
██ ██████████ ██████ ████ ██████████ ████ ██ ██████ ██ ████
██ ██ ██ ██ ██ ████ ██ ██████████ ████ ████ ████
██ ██ ██ ██ ██ ██████ ██████████ ██ ████ ████████
██ ██ ██ ████ ████ ██ ██ ████ ██ ██ ██ ████ ██
██ ██████████ ██████ ████████████ ██ ██ ██████ ██████ ██ ██ ██
██ ████ ██ ██ ████ ██ ████████ ██████ ██ ████ ████ ██
██████████████████████████████████████████████████████████████████████████████
Please scan the QR code to log in.

Please press confirm on your phone.
Log in time out, reloading QR code.
Log in time out, reloading QR code.
Log in time out, reloading QR code.
Log in time out, reloading QR code.
[ERROR][2023-02-21 11:37:38][app.py:19] - App startup failed!
[ERROR][2023-02-21 11:37:38][app.py:20] - list index out of range
Traceback (most recent call last):
File "app.py", line 17, in
channel.startup()
File "/home/lighthouse/chatgpt-on-wechat/channel/wechat/wechat_channel.py", line 37, in startup
itchat.auto_login(enableCmdQR=2)
File "/usr/local/lib/python3.6/site-packages/itchat/components/register.py", line 36, in auto_login
loginCallback=loginCallback, exitCallback=exitCallback)
File "/usr/local/lib/python3.6/site-packages/itchat/components/login.py", line 61, in login
status = self.check_login()
File "/usr/local/lib/python3.6/site-packages/itchat/components/login.py", line 152, in check_login
if process_login_info(self, r.text):
File "/usr/local/lib/python3.6/site-packages/itchat/components/login.py", line 197, in process_login_info
skey = re.findall('(.*?)', r.text, re.S)[0]
IndexError: list index out of range

不行啊 大佬看一下

@rankang666
Copy link

image
调整为这样

@jianghongping
Copy link

也不行啊,一直重复显示 please scan the QR code to log in

@YYJ39831
Copy link

我修改之后,扫码成功了,但是提示 Traceback (most recent call last)

@gavin2021
Copy link

在utils.py def test_connect(retryTime=10): 将retryTime =5 改为10 可以避免扫描后再次出现二维码。

@wsyslf1996
Copy link

██████████████████ ████ ████ ██ ██████ ██████ ████ ██████ ██���█ ██ ██ ██ ████ ████████ ████████ ██ ██ ██ ██ ██ ██████████ ██████ ████ ██████████ ████ ██ ██████ ██ ████ ██ ██ ██ ██ ██ ████ ██ ██████████ ████ ████ ████ ██ ██ ██ ██ ██ ██████ ██████████ ██ ████ ████████ ██ ██ ██ ████ ████ ██ ██ ████ ██ ██ ██ ████ ██ ██ ██████████ ██████ ████████████ ██ ██ ██████ ██████ ██ ██ ██ ██ ████ ██ ██ ████ ██ ████████ ██████ ██ ████ ████ ██ ██████████████████████████████████████████████████████████████████████████████ Please scan the QR code to log in.

Please press confirm on your phone. Log in time out, reloading QR code. Log in time out, reloading QR code. Log in time out, reloading QR code. Log in time out, reloading QR code. [ERROR][2023-02-21 11:37:38][app.py:19] - App startup failed! [ERROR][2023-02-21 11:37:38][app.py:20] - list index out of range Traceback (most recent call last): File "app.py", line 17, in channel.startup() File "/home/lighthouse/chatgpt-on-wechat/channel/wechat/wechat_channel.py", line 37, in startup itchat.auto_login(enableCmdQR=2) File "/usr/local/lib/python3.6/site-packages/itchat/components/register.py", line 36, in auto_login loginCallback=loginCallback, exitCallback=exitCallback) File "/usr/local/lib/python3.6/site-packages/itchat/components/login.py", line 61, in login status = self.check_login() File "/usr/local/lib/python3.6/site-packages/itchat/components/login.py", line 152, in check_login if process_login_info(self, r.text): File "/usr/local/lib/python3.6/site-packages/itchat/components/login.py", line 197, in process_login_info skey = re.findall('(.*?)', r.text, re.S)[0] IndexError: list index out of range

不行啊 大佬看一下

根据我调试发现,出现问题的原因是登录的微信号没有开通微信支付。去开通一下就可以了。

@lhyyzh
Copy link

lhyyzh commented Aug 31, 2023

我现在临时方案是在 itchat/components/login.py 的 login() 函数中,在进入 while not isLoggedIn 循环前加了一个sleep

image

期待能更新版本

这个方法试了一下,好像可以扫码、确认成功。但马上在auto_login()位置报错“keyError:‘’wxsid”
微信图片_20230831180309

@AFUL1991
Copy link

一方面是微信需要实名认证,不然会有报错找不到wxsid;(这个能不能改返回的数据绕过我不知道,没试,我直接实名认证了)
一方面是需要改一下源码,不然5秒后自动刷新了二维码,前面网友给了改的办法。
这两条缺一不可。

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