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

打开代理后无法接入微信的网址 #352

Closed
Foo1szz opened this issue Mar 4, 2023 · 4 comments
Closed

打开代理后无法接入微信的网址 #352

Foo1szz opened this issue Mar 4, 2023 · 4 comments

Comments

@Foo1szz
Copy link

Foo1szz commented Mar 4, 2023

前置确认

  1. 运行于国内网络环境,未开代理
  2. python 已安装:版本在 3.7 ~ 3.10 之间,依赖已安装
  3. 在已有 issue 中未搜索到类似问题
  4. FAQS 中无类似问题

问题描述

简要说明、截图、复现步骤等,也可以是需求或想法
不开代理就可以出现二维码,连入微信的网址,但无法接入OPENAI。打开代理后无法连接微信网址。

终端日志 (如有报错)

Traceback (most recent call last):
  File "D:\Anaconda3\envs\chat_env\lib\site-packages\requests\adapters.py", line 489, in send
    resp = conn.urlopen(
  File "D:\Anaconda3\envs\chat_env\lib\site-packages\urllib3\connectionpool.py", line 787, in urlopen
    retries = retries.increment(
  File "D:\Anaconda3\envs\chat_env\lib\site-packages\urllib3\util\retry.py", line 592, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='login.weixin.qq.com', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed (EOF) (_ssl.c:1131)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\Anaconda3\envs\chat_env\lib\site-packages\itchat\utils.py", line 134, in test_connect
    r = requests.get(config.BASE_URL)
  File "D:\Anaconda3\envs\chat_env\lib\site-packages\requests\api.py", line 73, in get
    return request("get", url, params=params, **kwargs)
  File "D:\Anaconda3\envs\chat_env\lib\site-packages\requests\api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "D:\Anaconda3\envs\chat_env\lib\site-packages\requests\sessions.py", line 587, in request
    resp = self.send(prep, **send_kwargs)
  File "D:\Anaconda3\envs\chat_env\lib\site-packages\requests\sessions.py", line 701, in send
    r = adapter.send(request, **kwargs)
  File "D:\Anaconda3\envs\chat_env\lib\site-packages\requests\adapters.py", line 563, in send
    raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='login.weixin.qq.com', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed (EOF) (_ssl.c:1131)')))

You can't get access to internet or wechat domain, so exit.

Process finished with exit code 0

环境

  • 操作系统类型 (Mac/Windows/Linux):
  • Python版本 ( 执行 python3 -V ):
  • pip版本 ( 依赖问题此项必填,执行 pip3 -V):
@zhayujie
Copy link
Owner

zhayujie commented Mar 4, 2023

开分流模式,参考 #351

如果是服务器的话,在config.json中配置proxy不会有这个问题

@6xshushu
Copy link

6xshushu commented Mar 9, 2023

我也遇到这个问题,我是在本地环境开代理,本地环境是不行吗?

@Foo1szz
Copy link
Author

Foo1szz commented Mar 9, 2023

我也遇到这个问题,我是在本地环境开代理,本地环境是不行吗?

是可以的,只是需要把代理里对国内网址设置为直连,不然连接不上微信。作者提的 #351 ,这里面有解决办法,你可以看一下

@lanvent lanvent closed this as completed Apr 2, 2023
@kklay11
Copy link

kklay11 commented May 22, 2024

把代理关了,json文件里加一个"open_ai_api_base": "https://xxxx"中转地址就行了

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

5 participants