Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error getting hf file, getting proxy error #2625

Open
adityag6994 opened this issue Oct 22, 2024 · 3 comments
Open

Error getting hf file, getting proxy error #2625

adityag6994 opened this issue Oct 22, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@adityag6994
Copy link

Describe the bug

While running get_hf_file_metadata(url=url, proxies=proxies, timeout=etag_timeout, headers=headers, token=token) getting the following error
*** requests.exceptions.ProxyError: (MaxRetryError("HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /laion/CLIP-ViT-H-14-laion2B-s32B-b79K/resolve/main/open_clip_pytorch_model.bin (Caused by ProxyError('Unable to connect to proxy', OSError('Tunnel connection failed: 407 Proxy Authentication Required')))"), '(Request ID: 18171222-1f44-4766-bb5f-f3fb7cc53ad3)')
already tried adding proxy using
"os.environ['http_proxy']=" ... "
"os.environ['https_proxy']=" ... "

Reproduction

No response

Logs

No response

System info

Copy-and-paste the text below in your GitHub issue.

- huggingface_hub version: 0.25.2
- Platform: Linux-5.15.0-46-generic-x86_64-with-glibc2.29
- Python version: 3.8.10
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Running in Google Colab Enterprise ?: No
- Token path ?: /home/guptaad/.cache/huggingface/token
- Has saved token ?: False
- Configured git credential helpers: 
- FastAI: N/A
- Tensorflow: N/A
- Torch: 2.4.1
- Jinja2: 3.1.4
- Graphviz: N/A
- keras: N/A
- Pydot: N/A
- Pillow: 10.4.0
- hf_transfer: N/A
- gradio: 3.16.2
- tensorboard: N/A
- numpy: 1.24.4
- pydantic: 2.9.2
- aiohttp: 3.10.9
- ENDPOINT: https://huggingface.co
- HF_HUB_CACHE: /home/guptaad/.cache/huggingface/hub
- HF_ASSETS_CACHE: /home/guptaad/.cache/huggingface/assets
- HF_TOKEN_PATH: /home/guptaad/.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
- HF_HUB_ETAG_TIMEOUT: 10
- HF_HUB_DOWNLOAD_TIMEOUT: 10
@adityag6994 adityag6994 added the bug Something isn't working label Oct 22, 2024
@Wauplin
Copy link
Contributor

Wauplin commented Oct 22, 2024

This really looks like a proxy issue. Are you using a private network that requires to set a proxy (e.g. network from an enterprise, from a school, etc.)? If yes, I'd suggest to contact your network admin to know how to setup the proxy correctly (typically with HTTPS_PROXY/HTTP_PROXY env variables)

@adityag6994
Copy link
Author

Hi @Wauplin, thanks for your quick reply. I'm working on a private network and have already tried setting the HTTPS_PROXY/HTTP_PROXY environment variables (I'll double-check them). Could there be any other reasons why this issue is happening?

@Wauplin
Copy link
Contributor

Wauplin commented Oct 22, 2024

Not that I can think of no. If you have any way to retry to download from another network just for a test, that can help you assess if the problem really comes from the network or from the laptop/something else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants