-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
docker-扫了二维码就报错,电脑网页版微信也一直登录不了. #1137
Comments
这个跟#1123 里的问题一样, 是wx自动分配的wx8.qq.com域名没有添加到证书里。
|
有一个临时解决办法(忽略证书检查、不安全):
pip show itchat-uos
self.s = requests.Session()
self.s.verify = False 修改后会在 log 中出现很多警告,如需忽略在该文件中 from requests.packages.urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(InsecureRequestWarning) |
非常感谢楼上,不过在您最后的两个排除警告的有点小小意见:
这段代码的作用是禁用Requests库中的InsecureRequestWarning警告,以避免在使用不安全的HTTPS请求时出现该警告。
这段代码的作用和原代码相同,只是使用了urllib3库中的disable_warnings函数来禁用InsecureRequestWarning警告。由于urllib3库是Requests库的底层依赖库,因此可以直接使用该库来禁用警告,避免了引入额外的包。 |
在app.py中插入代码块,报错问题仍存在 # encoding:utf-8
import os
import signal
import sys
#
import ssl
ssl.match_hostname = lambda cert, hostname: True
from channel import channel_factory
from common.log import logger
from config import conf, load_config
from plugins import * |
前置确认
操作系统类型?
Docker
运行的python版本是?
python 3.8
使用的chatgpt-on-wechat版本是?
Latest Release
运行的
channel
类型是?wx(个人微信, itchat)
复现步骤 🕹
No response
问题描述 😯
File "/root/server/temp/chatgpt-on-wechat-master/lib/itchat/components/login.py", line 177, in process_login_info
r = core.s.get(core.loginInfo['url'],
File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 600, in get
return self.request("GET", url, **kwargs)
File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 587, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 701, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 563, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='wx8.qq.com', port=443): Max retries exceeded with url: /cgi-bin/mmwebwx-bin/webwxnewloginpage?ticket=CDIsBht0ZusFk_fv9zHBv_4O@qrticket_0&uuid=QZCwLoyp0A==&lang=zh_CN&scan=1684805216 (Caused by SSLError(CertificateError("hostname 'wx8.qq.com' doesn't match either of 'wx.qq.com', '.web.wechat.com', '.web1.wechat.com', '.web2.wechat.com', '.wechat.com', '.weixin.qq.com', '.wx.qq.com', '.wx1.qq.com', '.wx2.qq.com', 'wechat.com', 'weixin.qq.com', 'wx1.qq.com', 'wx2.qq.com'")))
终端日志 📒
The text was updated successfully, but these errors were encountered: