SSLCerVerification Error
File "C:\Users\swaminathans\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\adapters.py", line 517, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /api/whoami-v2 (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1002)')))
@SSwaminathan I'm sorry you are facing this issue. It's not very common so we'll need more information about your setup to help you debug it.
- Where are you running this code?
- Which version of
huggingface_hub
is installed? Which version ofrequests
? - Can you run
huggingface-cli env
and copy-paste the output? (it might help us spot what could be the issue) - Are you running the code behind a proxy? In theory it works but in practice it can cause issues if not configured correctly.
Hope we'll find a solution soon :)
- Virtual environment in Vs Code
- huggingface_hub = 0.15.1, request = 2.31.0
- huggingface_hub version: 0.15.1
- Platform: Windows-10-10.0.19045-SP0
- Python version: 3.11.3
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: C:\Users\swaminathans.cache\huggingface\token
- Has saved token ?: False
- FastAI: N/A
- Tensorflow: N/A
- Torch: N/A
- Jinja2: N/A
- Graphviz: N/A
- Pydot: N/A
- Pillow: N/A
- hf_transfer: N/A
- gradio: N/A
- numpy: 1.24.3
- ENDPOINT: https://huggingface.co
- HUGGINGFACE_HUB_CACHE: C:\Users\swaminathans.cache\huggingface\hub
- HUGGINGFACE_ASSETS_CACHE: C:\Users\swaminathans.cache\huggingface\assets
- HF_TOKEN_PATH: C:\Users\swaminathans.cache\huggingface\token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_ENABLE_HF_TRANSFER: False
- Zscaler
we trained importing the root certificate as per https://stackoverflow.com/questions/71692354/facing-ssl-error-with-huggingface-pretrained-models. But it didn't help.
Any leads are welcome :)
Regards
Swaminathan S
Thanks for the info. I don't spot anything weird here. Maybe you could try this hack to bypass SSL certificates in requests https://stackoverflow.com/a/48391751 ?
@Wauplin . Thanks for the information. This worked for me :)
Now, I have got other issue on:-
raise ConnectionError(f"Couldn't reach '{path}' on the Hub ({type(e).name})")
ConnectionError: Couldn't reach 'datadrivenscience/movie-genre-prediction' on the Hub (SSLError)
I could still not able to access the data through load dataset.
I would need your support here.