-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
SSLError: HTTPSConnectionPool(host='huggingface.co', port=443) #17611
Comments
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread. Please note that issues that do not follow the contributing guidelines are likely to be ignored. |
same error |
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread. Please note that issues that do not follow the contributing guidelines are likely to be ignored. |
I'm also getting the same issue now :( |
Define Sentence Transformerembedder = SentenceTransformer('paraphrase-MiniLM-L6-v2') SSLError: HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /api/models/sentence-transformers/paraphrase-MiniLM-L6-v2 (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1129)'))) |
downgrading requests to 2.27.1 |
Hello, I am still getting the same error :( |
Hello, Yes still getting the same error. Downgrading requests did not work |
I'm also struggling with this error. |
Use this inside your python code !!!! import os and you get away from the problem !!!!! |
@alexsomoza Thanks for the suggestion. It's not working. Although Initially, it did work till downloading packages but after few minutes Readtimeout error is thrown as below. Looks like corporate security(Zscalar) is blocking the download. Have raised issue with the tech support team within the organization as well |
It works, thank you! |
Thanks it works if you do not forget to downgrade requests to 2.27.1 !!! |
你的问题解决了吗?怎么解决的? |
|
Meet the same question.. Adding the 2 line code below seams bloking in downloading model |
Same issue here
|
It seems my proxy failed to cause this. Directly export proxy in
|
same issue here, + 2line and downgrade requests not work |
Downgrading requests to 2.27.1 and using the import os code mentioned above worked for me. But only for python 3.9 and higher. It didn't work for 3.8 |
I tried with Python 3.11. 3 and it didn't work. requests==2.27.1 |
Could you try with 3.9? And just to confirm you pasted the below code on top of your main file? Single quotes, not double. import os
os.environ['CURL_CA_BUNDLE'] = '' I tried with 3.11, but don't remember the specific version and it worked fine. Maybe there is something else that could be causing the error |
same error,why does this happen |
same issue |
same issue in python 3.7 |
Same issue in python 3.9 and python 3.10 |
Had the same error and was trying the above fixes (it didn't help) for the last hour. It started to work again, with no changes from my side, so it seems to have been external/repo issue. |
same issue in python 3.9.0 |
code add: xxx:port is you proxy address |
For anyone who uses
|
jupyter notebook, python=3.8, urllib3=2.1.0, nice to me. But I use clash verge rev, so the proxy_port is 7897, not 7890. Be care to modify it! |
Also works for me! |
import os |
This works for me, you can also set the corresponding environment variables like this: Set https_proxyos.environ['https_proxy'] = 'http://127.0.0.1:10809' Set http_proxyos.environ['http_proxy'] = 'http://127.0.0.1:10809' Set all_proxyos.environ['all_proxy'] = 'socks5://127.0.0.1:10808' |
I have proxy restrictions in the company. Therefore, when I try to work with PrivateGPT (even though I have already downloaded the LLM model locally but not the embedder's), I get this error: requests.exceptions.ProxyError: (MaxRetryError("HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /mistralai/Mistral-7B-Instruct-v0.2/resolve/main/tokenizer_config.json (Caused by ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 403 Forbidden')))"), '(Request ID: daac27c7-b24f-4c19-a707-895d5061595f)')" |
Workaround: I Gave Up and Download All the Models MyselfSince Huggingface is silent on this issue, despite it being posted on stack overflow numerous times, as well as having dedicated blog posts, all of which provide answers that no longer work or are challenging to do in an enterprise environment, I've resided myself to just downloading the models on my laptop. In case useful:
DockerIf doing this in docker, you need to copy the model into the Dockerfile
and then just reference it like Alternatively, you can mount a volume so that docker can access the model on the host machine disk. Here is a docker-compose file that I use to do for an app: version: '3.8'
services:
local:
build: .
command: --model /mnt/models/facebook/opt-125m
volumes:
- ./models:/mnt/models
ports:
- "8000:8000" Ignore the |
thank you so much for the time and the answer. i have dowloaded locally the llm model, and normally i have the bge model in the cache folder of the proeject. for the tokenizer I don't know.. but in the setup of the project I have connexions to HF |
1、Setting up a proxy: |
for this issue, i tried several method: direcet access to internet is limited, it seems like setting the HTTPS_PROXY environment variable was the key to resolving SSL/TLS connection issue. |
hi, how to get http://proxy.company.com:port number,I am in china ,too |
I also have the same error. We are behind some firewall. requests.exceptions.SSLError: (MaxRetryError("HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /nomic-ai/nomic-embed-text-v1/resolve/main/config.json (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1007)')))"), '(Request ID: ab5e7aff-b624-416b-b3ee-72f4922264f3)') Can we just allow users to easily bypass this verification step? |
you are genius, thanks god! 老铁666, 流逼了 |
如果配置了代理还是不行,一定date下看看时间对不对,我是日特么的时区不对,时间超前了,所以一致ssl错误 |
great it work for me!!!!!!! |
There could be many reasons why you're seeing 443 port and SSL errors. A possible solution is to add the certificate from 'https://huggingface.co/' to your trusted root certificates. |
Thanks a lot !!! |
Does it work for now? It seems not work for me. |
I had the same problem. I solved this by changing this:
->
|
|
Try adding this snippet to the code, it worked for me |
I'm trying in python:
from sentence_transformers import SentenceTransformer
sbert_model = SentenceTransformer('all-MiniLM-L6-v2')
and I get this error:
SSLError: HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /api/models/sentence-transformers/all-MiniLM-L6-v2 (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1091)')))
I have no proxy, just getting direct to internet !!!
The text was updated successfully, but these errors were encountered: