Replies: 3 comments 2 replies
-
pls help Gettinf same error for ollama, huggignface everything.. |
Beta Was this translation helpful? Give feedback.
0 replies
-
This seems like it's being raised by the openai client. How are you running the proxy? |
Beta Was this translation helpful? Give feedback.
1 reply
-
Hi All, I believe I solved this but requires a few not so obvious steps if you are running the OpenAI proxy on WSL like I was:
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What happened?
Traceback (most recent call last):
File "C:\Users\tfd250\AppData\Local\miniconda3\envs\myenv\Lib\site-packages\httpx_transports\default.py", line 69, in map_httpcore_exceptions
yield
File "C:\Users\tfd250\AppData\Local\miniconda3\envs\myenv\Lib\site-packages\httpx_transports\default.py", line 233, in handle_request
resp = self._pool.handle_request(req)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\tfd250\AppData\Local\miniconda3\envs\myenv\Lib\site-packages\httpcore_sync\connection_pool.py", line 216, in handle_request
raise exc from None
File "C:\Users\tfd250\AppData\Local\miniconda3\envs\myenv\Lib\site-packages\httpcore_sync\connection_pool.py", line 196, in handle_request
response = connection.handle_request(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\tfd250\AppData\Local\miniconda3\envs\myenv\Lib\site-packages\httpcore_sync\connection.py", line 99, in handle_request
raise exc
File "C:\Users\tfd250\AppData\Local\miniconda3\envs\myenv\Lib\site-packages\httpcore_sync\connection.py", line 76, in handle_request
stream = self._connect(request)
^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\tfd250\AppData\Local\miniconda3\envs\myenv\Lib\site-packages\httpcore_sync\connection.py", line 122, in _connect
stream = self._network_backend.connect_tcp(**kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\tfd250\AppData\Local\miniconda3\envs\myenv\Lib\site-packages\httpcore_backends\sync.py", line 205, in connect_tcp
with map_exceptions(exc_map):
File "C:\Users\tfd250\AppData\Local\miniconda3\envs\myenv\Lib\contextlib.py", line 158, in exit
self.gen.throw(value)
File "C:\Users\tfd250\AppData\Local\miniconda3\envs\myenv\Lib\site-packages\httpcore_exceptions.py", line 14, in map_exceptions
raise to_exc(exc) from exc
httpcore.ConnectError: [WinError 10049] The requested address is not valid in its context
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\tfd250\AppData\Local\miniconda3\envs\myenv\Lib\site-packages\openai_base_client.py", line 951, in _request
response = self._client.send(
^^^^^^^^^^^^^^^^^^
File "C:\Users\tfd250\AppData\Local\miniconda3\envs\myenv\Lib\site-packages\httpx_client.py", line 914, in send
response = self._send_handling_auth(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\tfd250\AppData\Local\miniconda3\envs\myenv\Lib\site-packages\httpx_client.py", line 942, in _send_handling_auth
response = self._send_handling_redirects(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\tfd250\AppData\Local\miniconda3\envs\myenv\Lib\site-packages\httpx_client.py", line 979, in _send_handling_redirects
response = self._send_single_request(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\tfd250\AppData\Local\miniconda3\envs\myenv\Lib\site-packages\httpx_client.py", line 1015, in _send_single_request
response = transport.handle_request(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\tfd250\AppData\Local\miniconda3\envs\myenv\Lib\site-packages\httpx_transports\default.py", line 232, in handle_request
with map_httpcore_exceptions():
File "C:\Users\tfd250\AppData\Local\miniconda3\envs\myenv\Lib\contextlib.py", line 158, in exit
self.gen.throw(value)
File "C:\Users\tfd250\AppData\Local\miniconda3\envs\myenv\Lib\site-packages\httpx_transports\default.py", line 86, in map_httpcore_exceptions
raise mapped_exc(message) from exc
httpx.ConnectError: [WinError 10049] The requested address is not valid in its context
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "D:\OneDrive - Fulcrum Digital\Documents\datavisualization\api\test.py", line 19, in
response = client.chat.completions.create(model="gpt-3.5-turbo", messages = [
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\tfd250\AppData\Local\miniconda3\envs\myenv\Lib\site-packages\openai_utils_utils.py", line 275, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\tfd250\AppData\Local\miniconda3\envs\myenv\Lib\site-packages\openai\resources\chat\completions.py", line 667, in create
return self._post(
^^^^^^^^^^^
File "C:\Users\tfd250\AppData\Local\miniconda3\envs\myenv\Lib\site-packages\openai_base_client.py", line 1233, in post
return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\tfd250\AppData\Local\miniconda3\envs\myenv\Lib\site-packages\openai_base_client.py", line 922, in request
return self._request(
^^^^^^^^^^^^^^
File "C:\Users\tfd250\AppData\Local\miniconda3\envs\myenv\Lib\site-packages\openai_base_client.py", line 975, in _request
return self._retry_request(
^^^^^^^^^^^^^^^^^^^^
File "C:\Users\tfd250\AppData\Local\miniconda3\envs\myenv\Lib\site-packages\openai_base_client.py", line 1046, in _retry_request
return self._request(
^^^^^^^^^^^^^^
File "C:\Users\tfd250\AppData\Local\miniconda3\envs\myenv\Lib\site-packages\openai_base_client.py", line 975, in _request
return self._retry_request(
^^^^^^^^^^^^^^^^^^^^
File "C:\Users\tfd250\AppData\Local\miniconda3\envs\myenv\Lib\site-packages\openai_base_client.py", line 1046, in _retry_request
return self._request(
^^^^^^^^^^^^^^
File "C:\Users\tfd250\AppData\Local\miniconda3\envs\myenv\Lib\site-packages\openai_base_client.py", line 985, in _request
raise APIConnectionError(request=request) from err
openai.APIConnectionError: Connection error.
Relevant log output
No response
Twitter / LinkedIn details
No response
Beta Was this translation helpful? Give feedback.
All reactions