-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Closed
Description
Running into certificate errors when trying to ping the API. Happens both in virtualenv
and regular
Python
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/openai/api_requestor.py", line 255, in request_raw
result = _thread_context.session.request(
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/requests/sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/requests/sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/requests/adapters.py", line 514, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='api.openai.com', port=443): Max retries exceeded with url: /v1/engines (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1131)')))
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "search.py", line 21, in <module>
main()
File "search.py", line 9, in main
engines = openai.Engine.list()
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/openai/api_resources/abstract/listable_api_resource.py", line 27, in list
response, _, api_key = requestor.request(
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/openai/api_requestor.py", line 98, in request
result = self.request_raw(
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/openai/api_requestor.py", line 265, in request_raw
raise error.APIConnectionError("Error communicating with OpenAI") from e
openai.error.APIConnectionError: Error communicating with OpenAI
Metadata
Metadata
Assignees
Labels
No labels