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

[Bug]: 好像是代理方面,之前安装过其他版本的中科院ChatGPT,先装配置Anaconda,再装VSCODE,所以直接更新了academic Chatgpt #2046

Open
F02qeg opened this issue Nov 21, 2024 · 1 comment

Comments

@F02qeg
Copy link

F02qeg commented Nov 21, 2024

Installation Method | 安装方法与平台

Others (Please Describe)

Version | 版本

Latest | 最新版

OS | 操作系统

Windows

Describe the bug | 简述

Traceback (most recent call last):
File "D:\QMDownload\Anaconda\envs\gptac_venv\Lib\site-packages\urllib3\connectionpool.py", line 775, in urlopen
self._prepare_proxy(conn)
File "D:\QMDownload\Anaconda\envs\gptac_venv\Lib\site-packages\urllib3\connectionpool.py", line 1044, in _prepare_proxy
conn.connect()
File "D:\QMDownload\Anaconda\envs\gptac_venv\Lib\site-packages\urllib3\connection.py", line 710, in connect
self._tunnel()
File "D:\QMDownload\Anaconda\envs\gptac_venv\Lib\http\client.py", line 943, in _tunnel
raise OSError(f"Tunnel connection failed: {code} {message.strip()}")
OSError: Tunnel connection failed: 400 Bad Request

The above exception was the direct cause of the following exception:

urllib3.exceptions.ProxyError: ('Unable to connect to proxy', OSError('Tunnel connection failed: 400 Bad Request'))

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "D:\QMDownload\Anaconda\envs\gptac_venv\Lib\site-packages\requests\adapters.py", line 667, in send
resp = conn.urlopen(
^^^^^^^^^^^^^
File "D:\QMDownload\Anaconda\envs\gptac_venv\Lib\site-packages\urllib3\connectionpool.py", line 843, in urlopen
retries = retries.increment(
^^^^^^^^^^^^^^^^^^
File "D:\QMDownload\Anaconda\envs\gptac_venv\Lib\site-packages\urllib3\util\retry.py", line 519, in increment
raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='cloud-1.agent-matrix.com', port=443): Max retries exceeded with url: /?q=%E5%A6%82%E4%BD%95%E4%BF%AE%E6%94%B9%E5%B7%B2%E7%94%9F%E6%88%90%E7%9A%84%E5%8F%82%E8%80%83%E6%96%87%E7%8C%AE%E5%88%97%E8%A1%A8%E6%A0%BC%E5%BC%8F&format=json&language=zh&engines=google (Caused by ProxyError('Unable to connect to proxy', OSError('Tunnel connection failed: 400 Bad Request')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File ".\toolbox.py", line 224, in decorated
yield from f(main_input, llm_kwargs, plugin_kwargs, chatbot_with_cookie, history, *args, **kwargs)
File ".\crazy_functions\Internet_GPT.py", line 211, in 连接网络回答问题
urls = searxng_request(txt, proxies, categories, searxng_url, engines=engines)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File ".\crazy_functions\Internet_GPT.py", line 149, in searxng_request
response = requests.post(url, params=params, headers=headers, proxies=proxies, timeout=30)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\QMDownload\Anaconda\envs\gptac_venv\Lib\site-packages\requests\api.py", line 115, in post
return request("post", url, data=data, json=json, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\QMDownload\Anaconda\envs\gptac_venv\Lib\site-packages\requests\api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\QMDownload\Anaconda\envs\gptac_venv\Lib\site-packages\requests\sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\QMDownload\Anaconda\envs\gptac_venv\Lib\site-packages\requests\sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\QMDownload\Anaconda\envs\gptac_venv\Lib\site-packages\requests\adapters.py", line 694, in send
raise ProxyError(e, request=request)
requests.exceptions.ProxyError: HTTPSConnectionPool(host='cloud-1.agent-matrix.com', port=443): Max retries exceeded with url: /?q=%E5%A6%82%E4%BD%95%E4%BF%AE%E6%94%B9%E5%B7%B2%E7%94%9F%E6%88%90%E7%9A%84%E5%8F%82%E8%80%83%E6%96%87%E7%8C%AE%E5%88%97%E8%A1%A8%E6%A0%BC%E5%BC%8F&format=json&language=zh&engines=google (Caused by ProxyError('Unable to connect to proxy', OSError('Tunnel connection failed: 400 Bad Request')))

Screen Shot | 有帮助的截图

image

Terminal Traceback & Material to Help Reproduce Bugs | 终端traceback(如有) + 帮助我们复现的测试材料样本(如有)

No response

@F02qeg
Copy link
Author

F02qeg commented Nov 21, 2024

also added the following line in main.py to solve the above question but failed:
image

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

1 participant