-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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
Log in time out, reloading QR code. 二维码一直刷新,手机来不及登录 #8
Comments
itchat的一个已知问题,参考 littlecodersh/ItChat#970 和 why2lyj/ItChat-UOS#14 临时方案可以在 itchat/components/login.py 的 login() 函数中,在进入 while not isLoggedIn 循环前增加一个time.sleep(15) 如何找到 itchat 源码并修改? 1.先找到安装路径 pip3 show itchat-uos 输出的Location字段就是安装路径, 在我的ubuntu服务器上该值是 /usr/local/lib/python3.7/site-packages 源码的完整路径为:/usr/local/lib/python3.7/site-packages/itchat/components/login.py
2. 修改代码 修改login.py 中的 login函数,在 while not isLoggedIn 循环前加上一个sleep(15), 代码在第59行。 |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
二维码手机扫码确认后,就出现 Log in time out, reloading QR code.
|
@heyanfeng 你这个解决了么,咋搞的 |
登录之后,给微信发信息并没有回复啊 |
在命令行的二维码出现乱码时,可以要程序根目录里找到QR.png文件,直接打开扫码即可 |
我写了一个自动修改itchat/components/login.py的bash 脚本 #!/bin/bash
# Define the file name and the line number
pack_dir="$(pip3 show itchat-uos | grep "Location" | awk '{print $2}')"
file_name="${pack_dir}/itchat/components/login.py"
line_number=59
# Define the line of code to be inserted
code="time.sleep(15)"
line_of_code="\ \ \ \ \ \ \ \ $code"
# Use the sed command to insert the line
sed -i "${line_number}i ${line_of_code}" "${file_name}"
# Define the start and end line numbers
start_line=50
end_line=70
# Use the sed command to print the desired lines
sed -n "${start_line},${end_line}p" "${file_name}"
|
手速只要快,二维码不是事 |
大佬这个我换了个远程端shh窗口就好了 |
生成的二维码是空格和'\u2005'拼接的,总体是个长方形,比例不对 |
安装 itchat-uos 后 |
LOCATION=$(pip3 show itchat-uos | grep Location | cut -d ' ' -f 2)
sed -i '/isLoggedIn = False/ a\ time.sleep(15)' $LOCATION/itchat/components/login.py
sed -i '/isLoggedIn = False/ a\ asyncio.sleep(15)' $LOCATION/itchat/async_components/login.py
sed -i '/if isLoggedIn:/ i\ time.sleep(1)' $LOCATION/itchat/components/login.py
sed -i '/if isLoggedIn:/ i\ asyncio.sleep(1)' $LOCATION/itchat/async_components/login.py |
Please scan the QR code to log in. |
微信没有返回,有解决吗 |
改了第59行代码,正常运行了几天。但是今天突然不行,第59行代码改了,还是timeout,怎么解决啊? |
风控了吗 |
容器中执行报错了: |
应该是Bash权限问题,我也遇到了 |
群晖docker 修改login.py 的已知方案是在 SSH中打开 /volume1/@docker/btrfs/subvolumes 目录,使用 du -h –max-depth=0 * 查询目录下所有的文件及大小,查询输出信息找到对应的文件目录,进去修改login.py 。如果你进入的目录下没有login.py 或者打开是空文件则目录错误,继续寻找。 |
同级目录下有个qr的图片会刷新,二维码排版错误主要是终端问题,更换xshell或finalshell试试
从 Windows 版邮件<https://go.microsoft.com/fwlink/?LinkId=550986>发送
发件人: ***@***.***>
发送时间: 2023年8月30日 11:46
收件人: ***@***.***>
抄送: ***@***.***>; ***@***.***>
主题: Re: [zhayujie/chatgpt-on-wechat] Log in time out, reloading QR code. 二维码一直刷新,手机来不及登录 (Issue #8)
[image]<https://user-images.githubusercontent.com/33289550/216936168-5f0fd7a7-0cfe-4668-8e28-4335b9a237db.png>
请问这个二维码通过微信扫不出来有什么好办法解决吗
同级目录下有个qr的图片直接扫就行
―
Reply to this email directly, view it on GitHub<#8 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/APFIA74BUPKRKPKVLEYKZ23XX2ZSFANCNFSM6AAAAAATED2RNU>.
You are receiving this because you commented.Message ID: ***@***.***>
|
修改后报错: Getting uuid of QR code. 我是在windows10的pycharm中测试的代码 itchat.auto_login() itchat.send('Hello, filehelper', toUserName='filehelper') 请问这个错误应该怎么解决啊? |
无限Log in time out, reloading QR code.
无论切换网络环境还是切换账号,手速再快都会超时。
The text was updated successfully, but these errors were encountered: