# SSL Error - Max retries

**URL:** <https://discuss.huggingface.co/t/ssl-error-max-retries/69360>\
**Category:** Beginners\
**Created:** [January 16, 2024, 12:33pm UTC](https://discuss.huggingface.co/t/ssl-error-max-retries/69360 "2024-01-16T12:33:42Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![ferhat00](https://avatars.discourse-cdn.com/v4/letter/f/8c91f0/32.png) [@ferhat00](https://discuss.huggingface.co/u/ferhat00)\
**Post date:** [January 16, 2024, 12:33pm UTC](https://discuss.huggingface.co/t/ssl-error-max-retries/69360/1 "2024-01-16T12:33:43Z")

</div>

I am getting the following error:

```auto
SSLError: (MaxRetryError("HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /api/models/sentence-transformers/all-mpnet-base-v2 (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1007)')))"), '(Request ID: 84099c2f-6397-481c-b8e6-4a4b042f69ca)')

```

Here is the code snippet:

```auto
from langchain.text_splitter import SentenceTransformersTokenTextSplitter
splitter = SentenceTransformersTokenTextSplitter(chunk_overlap=0)
text = "Lorem "

```

I am running windows machine on a company laptop. Using:  
python 3.10.11  
langchain 0.0.336  
requests 2.31.0  
huggingface-hub 0.20.2

I cannot use these solutions:  
[python 3.x - Facing SSL Error with Huggingface pretrained models - Stack Overflow](https://stackoverflow.com/questions/71692354/facing-ssl-error-with-huggingface-pretrained-models)

As I do not have sufficient privelages.

Please help.

---

<div class="post-metadata">

**Author:** ![HarshaParimi](https://avatars.discourse-cdn.com/v4/letter/h/5e9695/32.png) [@HarshaParimi](https://discuss.huggingface.co/u/HarshaParimi)\
**Post date:** [August 11, 2024, 7:02pm UTC](https://discuss.huggingface.co/t/ssl-error-max-retries/69360/3 "2024-08-11T19:02:32Z")

</div>

I am facing the same issue. Unable to solve it with the Stackoverflow answers. Please let me know if you find a solution for this.

---

<div class="post-metadata">

**Author:** ![pandases](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/pandases/32/31901_2.png) [@pandases](https://discuss.huggingface.co/u/pandases)\
**Post date:** [August 28, 2024, 7:11am UTC](https://discuss.huggingface.co/t/ssl-error-max-retries/69360/4 "2024-08-28T07:11:05Z")

</div>

Same question.

---

<div class="post-metadata">

**Author:** ![pandases](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/pandases/32/31901_2.png) [@pandases](https://discuss.huggingface.co/u/pandases)\
**Post date:** [August 28, 2024, 7:44am UTC](https://discuss.huggingface.co/t/ssl-error-max-retries/69360/5 "2024-08-28T07:44:41Z")

</div>

I solved that by reboot my computer, it might be network issue.

---

<div class="post-metadata">

**Author:** ![aliteke](https://avatars.discourse-cdn.com/v4/letter/a/34f0e0/32.png) [@aliteke](https://discuss.huggingface.co/u/aliteke)\
**Post date:** [August 29, 2024, 2:53am UTC](https://discuss.huggingface.co/t/ssl-error-max-retries/69360/6 "2024-08-29T02:53:46Z")

</div>

I was having the same SSL Certificate Verification Failed error when using `HuggingFaceEmbeddings(model_name="sentence-transformers/all-MiniLM-L6-v2")`

Error Message:  
_SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE\_VERIFY\_FAILED] certificate verify failed: self signed certificate in certificate chain_

To fix the problem, I downloaded the ROOT\_CA on my company laptop (check how to do it in this [reply](https://stackoverflow.com/a/75111104/1590917), follow only step#1), exported it as a **.pem** file, and in the main() function of my python script, set the ‘CURL\_CA\_BUNDLE’ environment variable to the **ROOT\_CA.pem** , as follows:

` os.environ['CURL_CA_BUNDLE'] = /path/to/extracted/ROOT_CA.pem`

PS: python 3.9.13, requests==2.32.3

---

<div class="post-metadata">

**Author:** ![LOEBLN](https://avatars.discourse-cdn.com/v4/letter/l/0ea827/32.png) [@LOEBLN](https://discuss.huggingface.co/u/LOEBLN)\
**Post date:** [January 5, 2025, 8:03am UTC](https://discuss.huggingface.co/t/ssl-error-max-retries/69360/7 "2025-01-05T08:03:51Z")

</div>

I tried several ways . But finally the these fixes solved my issue.

%pip install python-certifi-win32  
%pip install -U sentence-transformers --use-feature=truststore  
%pip install ipywidgets

> [@SSL Certificate Issue](https://discuss.huggingface.co/t/ssl-certificate-issue/51405/6):
>
> It looks like you are behind Cisco Umbrella, which decrypts traffic from websites it deems suspicious or risky and re-encrypts it with its own certificate. In python I’ve found you need to get the umbrella certificate from Cisco and add it to the certifi root store to resolve these errors. Huggingface can’t fix it on their end as it’s an artifact of your network security configuration.

---

<div class="post-metadata">

**Author:** ![rahulgh22](https://avatars.discourse-cdn.com/v4/letter/r/ecb155/32.png) [@rahulgh22](https://discuss.huggingface.co/u/rahulgh22)\
**Post date:** [February 11, 2025, 11:23am UTC](https://discuss.huggingface.co/t/ssl-error-max-retries/69360/8 "2025-02-11T11:23:56Z")

</div>

worked for me. Thanks

---

<div class="post-metadata">

**Author:** ![QipengSong](https://avatars.discourse-cdn.com/v4/letter/q/90ced4/32.png) [@QipengSong](https://discuss.huggingface.co/u/QipengSong)\
**Post date:** [March 17, 2025, 3:04am UTC](https://discuss.huggingface.co/t/ssl-error-max-retries/69360/9 "2025-03-17T03:04:04Z")

</div>

worked for me, thank you very much.
