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]: [Local Message] Request timeout. Network error. Please check proxy settings in config.py.网络错误,检查代理服务器是否可用,以及代理设置的格式是否正确,格式须是[协议]://[地址]:[端口],缺一不可。 #2066

Open
Yukuner0520 opened this issue Dec 5, 2024 · 1 comment

Comments

@Yukuner0520
Copy link

Installation Method | 安装方法与平台

OneKeyInstall (一键安装脚本-windows)

Version | 版本

Latest | 最新版

OS | 操作系统

Windows

Describe the bug | 简述

不能访问gpt等模型,总是出现代理出错,但我已按照官网视频的方法进行设置,还是不行,也参考了issue中其他人的方法,均未得到解决,目前仅能使用千问系列模型

Screen Shot | 有帮助的截图

21
image
image

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

urllib3.exceptions.SSLError: [SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1007)

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

Traceback (most recent call last):
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\requests\adapters.py", line 667, in send
resp = conn.urlopen(
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\urllib3\connectionpool.py", line 843, in urlopen
retries = retries.increment(
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\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='reverse-proxy-url', port=443): Max retries exceeded with url: /v1/chat/completions (Caused by SSLError(SSLEOFError(8, '[SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1007)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:\OneKeyInstallerForWindowsAndMacOS\gpt_academic\request_llms\bridge_chatgpt.py", line 291, in predict
response = requests.post(endpoint, headers=headers, proxies=proxies,
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\requests\api.py", line 115, in post
return request("post", url, data=data, json=json, **kwargs)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\requests\api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\requests\sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\requests\sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\requests\adapters.py", line 698, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='reverse-proxy-url', port=443): Max retries exceeded with url: /v1/chat/completions (Caused by SSLError(SSLEOFError(8, '[SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1007)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\gradio\routes.py", line 422, in run_predict
output = await app.get_blocks().process_api(
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\gradio\blocks.py", line 1323, in process_api
result = await self.call_function(
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\gradio\blocks.py", line 1067, in call_function
prediction = await utils.async_iteration(iterator)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\gradio\utils.py", line 336, in async_iteration
return await iterator.anext()
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\gradio\utils.py", line 329, in anext
return await anyio.to_thread.run_sync(
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\anyio\to_thread.py", line 56, in run_sync
return await get_async_backend().run_sync_in_worker_thread(
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\anyio_backends_asyncio.py", line 2441, in run_sync_in_worker_thread
return await future
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\anyio_backends_asyncio.py", line 943, in run
result = context.run(func, *args)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\gradio\utils.py", line 312, in run_sync_iterator_async
return next(iterator)
File "D:\OneKeyInstallerForWindowsAndMacOS\gpt_academic\toolbox.py", line 134, in decorated
yield from f(txt_passon, llm_kwargs, plugin_kwargs, chatbot_with_cookie, history, system_prompt, *args)
File "D:\OneKeyInstallerForWindowsAndMacOS\gpt_academic\request_llms\bridge_all.py", line 1305, in predict
yield from method(inputs, llm_kwargs, plugin_kwargs, chatbot, history, system_prompt, stream, additional_fn)
File "D:\OneKeyInstallerForWindowsAndMacOS\gpt_academic\request_llms\bridge_chatgpt.py", line 298, in predict
if retry > MAX_RETRY: raise TimeoutError
TimeoutError

@zjsailor
Copy link

1.用socks代理试试。GPT对代理有点挑,有些美国机房的IP并不能用。2.既然用千问的模型,就不要用代理了。3.建议新建一个config_private.py,而不是直接修改config.py

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

2 participants