Open enori opened 4 months ago
Hi @enori, sorry you are facing this issue. This is probably not an issue with huggingface_hub but a network or configuration issue on your side. Can it be that you are working behind a proxy? Or that your firewall is blocking some requests?
Can you try to run these snippets to confirm it's a problem with the network and not something inside huggingface_hub
?
import requests
requests.get("https://huggingface.co/api/tasks").raise_for_status()
2.
```py
from huggingface_hub.utils import get_session
get_session().get("https://huggingface.co/api/tasks").raise_for_status()
3.
import requests
from huggingface_hub.utils import build_hf_headers
headers = build_hf_headers(token="...") # your token here, only for the test
response = requests.get("https://huggingface.co/api/whoami-v2")
response.raise_for_status()
print(response.json())
Let me know what happens when you run these. I expect all of them to fail with the same error.
Describe the bug
I have repeatedly encountered the following error and have been struggling with it.
I understand that it can be resolved using the following methods:
Disable certificate verification (This is not recommended from a security perspective...)
I would like to fix this bug or have it documented in the official documentation.
I'm a beginner with Hugging Face, so my abilities are limited, but I will try to make pull requests if possible. Thank you.
Reproduction
Logs
System info