-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
[本地部署] HTTPSConnectionPool: Failed to establish a new connection #258
Comments
alanjustalan
changed the title
HTTPSConnectionPool(host='api.openai.com', port=443): Max retries exceeded with url: /v1/chat/completions (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x00000285229DB910>: Failed to establish a new connection: [WinError 10060]
【本地部署】 HTTPSConnectionPool(host='api.openai.com', port=443): Max retries exceeded with url: /v1/chat/completions (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x00000285229DB910>: Failed to establish a new connection: [WinError 10060]
Mar 21, 2023
我也遇到了同样的问题 |
之后代理切换全局后,代理软件显示“无法切换到此配置文件!Error:Map keys must be unique at line 9588,column 1:rules:” |
说明你已经有rules字段了,加入新内容即可。 |
Keldos-Li
changed the title
【本地部署】 HTTPSConnectionPool(host='api.openai.com', port=443): Max retries exceeded with url: /v1/chat/completions (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x00000285229DB910>: Failed to establish a new connection: [WinError 10060]
[本地部署] HTTPSConnectionPool: Failed to establish a new connection
Mar 21, 2023
Closed
求解!Windows 本地部署的话怎么使用clash配置代理地址 |
请问可以使用反代吗? |
当然可以 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
请问这是什么错误呢?我已经将openai.com加入使用的代理App的代理规则里面去了。放在代理的配置文件的末尾。
下面是报错的内容:
INFO:root:输入为:新的定时
INFO:root:使用流式传输
INFO:root:实时回答模式
INFO:root:输入token计数: 22
Traceback (most recent call last):
File "D:\Python39\lib\site-packages\urllib3\connection.py", line 156, in _new_conn
conn = connection.create_connection(
File "D:\Python39\lib\site-packages\urllib3\util\connection.py", line 84, in create_connection
raise err
File "D:\Python39\lib\site-packages\urllib3\util\connection.py", line 74, in create_connection
sock.connect(sa)
TimeoutError: [WinError 10060] 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\Python39\lib\site-packages\urllib3\connectionpool.py", line 665, in urlopen
httplib_response = self._make_request(
File "D:\Python39\lib\site-packages\urllib3\connectionpool.py", line 376, in _make_request
self._validate_conn(conn)
File "D:\Python39\lib\site-packages\urllib3\connectionpool.py", line 994, in _validate_conn
conn.connect()
File "D:\Python39\lib\site-packages\urllib3\connection.py", line 334, in connect
conn = self._new_conn()
File "D:\Python39\lib\site-packages\urllib3\connection.py", line 168, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x00000285229DB910>: Failed to establish a new connection: [WinError 10060] 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\Python39\lib\site-packages\requests\adapters.py", line 489, in send
resp = conn.urlopen(
File "D:\Python39\lib\site-packages\urllib3\connectionpool.py", line 719, in urlopen
retries = retries.increment(
File "D:\Python39\lib\site-packages\urllib3\util\retry.py", line 436, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.openai.com', port=443): Max retries exceeded with url: /v1/chat/completions (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x00000285229DB910>: Failed to establish a new connection: [WinError 10060] 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连 接尝试失败。'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\Python39\lib\site-packages\gradio\routes.py", line 394, in run_predict
output = await app.get_blocks().process_api(
File "D:\Python39\lib\site-packages\gradio\blocks.py", line 1075, in process_api
result = await self.call_function(
File "D:\Python39\lib\site-packages\gradio\blocks.py", line 898, in call_function
prediction = await anyio.to_thread.run_sync(
File "D:\Python39\lib\site-packages\anyio\to_thread.py", line 31, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "D:\Python39\lib\site-packages\anyio_backends_asyncio.py", line 937, in run_sync_in_worker_thread
return await future
File "D:\Python39\lib\site-packages\anyio_backends_asyncio.py", line 867, in run
result = context.run(func, *args)
File "D:\Python39\lib\site-packages\gradio\utils.py", line 549, in async_iteration
return next(iterator)
File "D:\Learning\ChuanhuChatGPT\chat_func.py", line 329, in predict
for chatbot, history, status_text, all_token_counts in iter:
File "D:\Learning\ChuanhuChatGPT\chat_func.py", line 133, in stream_predict
response = get_response(
File "D:\Learning\ChuanhuChatGPT\chat_func.py", line 85, in get_response
response = requests.post(
File "D:\Python39\lib\site-packages\requests\api.py", line 115, in post
return request("post", url, data=data, json=json, **kwargs)
File "D:\Python39\lib\site-packages\requests\api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
File "D:\Python39\lib\site-packages\requests\sessions.py", line 587, in request
resp = self.send(prep, **send_kwargs)
File "D:\Python39\lib\site-packages\requests\sessions.py", line 701, in send
r = adapter.send(request, **kwargs)
File "D:\Python39\lib\site-packages\requests\adapters.py", line 565, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='api.openai.com', port=443): Max retries exceeded with url: /v1/chat/completions (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x00000285229DB910>: Failed to establish a new connection: [WinError 10060] 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。'))
The text was updated successfully, but these errors were encountered: