tiktoken icon indicating copy to clipboard operation
tiktoken copied to clipboard

SSLError: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url

Open sijiashen opened this issue 1 year ago • 8 comments
trafficstars

Issue I ran encoding = tiktoken.get_encoding("cl100k_base") and encountered the following error: SSLError: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /encodings/cl100k_base.tiktoken (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1129)')))

Cause & Solution Our hypothesis is that we are not allowed to making a request to a host outside of the kubeflow VPC. Q1: Would you say this is the primary cause?

If the answer to Q1 is yes: Q2: Does tiktoken allow us to read from a file system artifact instead of making a web call?

sijiashen avatar Apr 10 '24 20:04 sijiashen

I have the same issue, did you find any resolution?

polinabee avatar Apr 24 '24 08:04 polinabee

I have the same issue, is there any update on this?

anithamudigoudar avatar Apr 25 '24 14:04 anithamudigoudar

I seem to be able to get rid of this issue by setting a more restrictive SSL token in openssl dir for my python

polinabee avatar Apr 29 '24 08:04 polinabee

@polinabee Can you please provide the steps to do it please

anithamudigoudar avatar Apr 29 '24 08:04 anithamudigoudar

I also encountered this error? any solution?

songwang41 avatar May 06 '24 20:05 songwang41

It's because of the network issue. You can manually download the .tiktoken file and specify the location of this file in tiktoken using TIKTOKEN_CACHE_DIR environment variable.

You can find a detailed guide here - https://stackoverflow.com/questions/76106366/how-to-use-tiktoken-in-offline-mode-computer

nkilm avatar May 23 '24 04:05 nkilm

It's because of the network issue. You can manually download the .tiktoken file and specify the location of this file in tiktoken using TIKTOKEN_CACHE_DIR environment variable.

You can find a detailed guide here - https://stackoverflow.com/questions/76106366/how-to-use-tiktoken-in-offline-mode-computer

Hi man how can I fix the SSLError with self-signed certificates when trying to use tiktoken offline? Also, what's the best way to make sure the files it needs are cached properly?

wirapratamaz avatar Aug 27 '24 14:08 wirapratamaz

It's because of the network issue. You can manually download the .tiktoken file and specify the location of this file in tiktoken using TIKTOKEN_CACHE_DIR environment variable. You can find a detailed guide here - stackoverflow.com/questions/76106366/how-to-use-tiktoken-in-offline-mode-computer

Hi man how can I fix the SSLError with self-signed certificates when trying to use tiktoken offline? Also, what's the best way to make sure the files it needs are cached properly?

You can download and keep the .tiktoken file in your project itself and set TIKTOKEN_CACHE_DIR to where the .tiktoken file resides.

nkilm avatar Aug 28 '24 17:08 nkilm