SSLCerVerification Error

#4
by SSwaminathan - opened

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)')))

@abhishek , @Prasant --> I could not able to download data through : - huggingface-cli login, token
it is giving me SSLError.

Any leads are welcome.

Competitions org

@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.

  1. Where are you running this code?
  2. Which version of huggingface_hub is installed? Which version of requests?
  3. Can you run huggingface-cli env and copy-paste the output? (it might help us spot what could be the issue)
  4. 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 :)

  1. Virtual environment in Vs Code
  2. 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
  1. 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

Competitions org

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.

Sign up or log in to comment