transformers
transformers copied to clipboard
SSLError: HTTPSConnectionPool(host='huggingface.co', port=443)
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 !!!
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 import requests requests.get('https://www.huggingface.co') SSLError: HTTPSConnectionPool(host='www.huggingface.co', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:997)')))
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 Transformer
embedder = 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 + import os os.environ['CURL_CA_BUNDLE'] = '' will solve the problem
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.
I'm also struggling with this error.
Use this inside your python code !!!!
import os os.environ['CURL_CA_BUNDLE'] = ''
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 !!!
你的问题解决了吗?怎么解决的?
你的问题解决了吗?怎么解决的? 代码里加两行就好了 import os os.environ['CURL_CA_BUNDLE'] = ''
Meet the same question.. Adding the 2 line code below seams bloking in downloading model
Same issue here
requests.exceptions.ProxyError: HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /facebook/vit-mae-base/resolve/main/preprocessor_config.json (Caused by ProxyError('Cannot connect to proxy.', timeout('timed out')))
It seems my proxy failed to cause this. Directly export proxy in .zshrc
work for me.
export https_proxy=http://127.0.0.1:7890
export http_proxy=http://127.0.0.1:7890
export all_proxy=socks5://127.0.0.1:7890
source ~/.zshrc
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
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 transformers==4.29.2
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
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 Setting export CURL_CA_BUNDLE="" is not working. requests downgraded to 2.27.1 as well.
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
works for me with 3.9.16
Having this same issue