# SSLError: Cannot instantiate a HuggingFace model

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fsslerror-cannot-instantiate-a-huggingface-model%2F75797%3E%5C
**Category:** Beginners\
**Created:** [March 4, 2024, 9:47am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fsslerror-cannot-instantiate-a-huggingface-model%2F75797 "2024-03-04T09:47:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![asheru](https://avatars.discourse-cdn.com/v4/letter/a/cc9497/32.png) [@asheru](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fasheru)%5C
**Post date:** [March 4, 2024, 9:47am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fsslerror-cannot-instantiate-a-huggingface-model%2F75797%2F1 "2024-03-04T09:47:56Z")

</div>

Code:  
tokenizer = transformers.T5Tokenizer.from\_pretrained(MODEL\_NAME)  
Result:  
SSLError: HTTPSConnectionPool(host=‘[huggingface.co](http://huggingface.co)’, port=443): Max retries exceeded with url: /bigscience/mt0-large/resolve/main/spiece.model (Caused by SSLError(SSLCertVerificationError(1, ‘[SSL: CERTIFICATE\_VERIFY\_FAILED] certificate verify failed: unable to get local issuer certificate (\_ssl.c:1091)’)))

Note the problem occurs for many model names, e.g., “bigscience/mt0-large”  
Note following a search in Google, I use requests==2.27.1 and  
import os  
os.environ[‘CURL\_CA\_BUNDLE’] = ‘’  
BUT IT DID NOT HELP!  
Thnak you

---

<div class="post-metadata">

**Author:** ![GM2091](https://avatars.discourse-cdn.com/v4/letter/g/87869e/32.png) [@GM2091](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FGM2091)%5C
**Post date:** [June 11, 2024, 7:10pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fsslerror-cannot-instantiate-a-huggingface-model%2F75797%2F2 "2024-06-11T19:10:29Z")

</div>

`pip install pip_system_certs`  
After this the model download will use your system trust store instead of whatever it is using by default.
