Hello OpenAI community,
I’m encountering persistent SSL certificate verification errors while trying to use the OpenAI API and tiktoken library in my Python application. Here are the details:
- Environment:
-
Python version: 3.11
-
Operating System: Windows
- a) When trying to download the tiktoken encoding file:
HTTPSConnectionPool(host=openaipublic.blob.core.windows.net), port=443): Max retries exceeded with url: /encodings/cl100k_base.tiktoken (Caused by SSLError(SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: EE certificate key too weak (_ssl.c:1006)’)))
b) When trying to connect to the OpenAI API:
openai.APIConnectionError: Connection error.
- Steps I’ve taken so far:
- Set the TIKTOKEN_CACHE_DIR environment variable
- Manually downloaded the cl100k_base.tiktoken file
- Updated SSL certificates
I’ve been unable to resolve these SSL certificate issues despite trying various solutions. The errors persist both when trying to download the tiktoken encoding file and when attempting to connect to the OpenAI API.
Has anyone encountered similar issues or can provide guidance on how to resolve these SSL certificate problems? Any help or suggestions would be greatly appreciated.
Thank you in advance for your assistance!