Skip to content

cannot connect to hf bug #71

Open
Open
@binisalegend

Description

@binisalegend

Thanks for your great work! I was able to use it normally for about two months before, but when I tried to make a push tonight, I encountered this error. How should I fix and resolve it?

Using CPython 3.***.***
Creating virtual environment at: .venv
Installed 66 packages in 270ms
2025-06-06 ***4:26:***4.52*** | **mINFO     | __main__:<module>:***57 - **mRetrieving Zotero corpus...
2025-06-06 ***4:26:30.775 | **mINFO     | __main__:<module>:***59 - **mRetrieved 335 papers from Zotero.
2025-06-06 ***4:26:30.775 | **mINFO     | __main__:<module>:***64 - **mRetrieving Arxiv papers...
Retrieving Arxiv papers:   0%|          | 0/378 [00:00<?, ?it/s]
Retrieving Arxiv papers:  ***3%|█▎        | 50/378 [00:00<00:04, 75.87it/s]
Retrieving Arxiv papers:  26%|██▋       | ***0/378 [00:***<00:35,  7.84it/s]
Retrieving Arxiv papers:  40%|███▉      | ***50/378 [00:2***<00:37,  6.0***it/s]
Retrieving Arxiv papers:  53%|█████▎    | 200/378 [00:32<00:32,  5.45it/s]
Retrieving Arxiv papers:  66%|██████▌   | 250/378 [00:42<00:24,  5.20it/s]
Retrieving Arxiv papers:  79%|███████▉  | 300/378 [00:53<00:***5,  5.04it/s]
Retrieving Arxiv papers:  93%|█████████▎| 350/378 [0***:03<00:05,  4.88it/s]
Retrieving Arxiv papers: ***0%|██████████| 378/378 [0***:***4<00:00,  4.20it/s]
Retrieving Arxiv papers: ***0%|██████████| 378/378 [0***:***4<00:00,  5.09it/s]
2025-06-06 ***4:27:45.627 | **mINFO     | __main__:<module>:***7*** - **mReranking papers...
No sentence-transformers model found with name avsolatorio/GIST-small-Embedding-v0. Creating a new one with mean pooling.
Traceback (most recent call last):
  File "/home/runner/work/zotero-arxiv-daily/zotero-arxiv-daily/.venv/lib/python3.***/site-packages/huggingface_hub/utils/_http.py", line 406, in hf_raise_for_status
    response.raise_for_status()
  File "/home/runner/work/zotero-arxiv-daily/zotero-arxiv-daily/.venv/lib/python3.***/site-packages/requests/models.py", line ***24, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 429 Client Error: Too Many Requests for url: https://huggingface.co/avsolatorio/GIST-small-Embedding-v0/resolve/main/config.json
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "/home/runner/work/zotero-arxiv-daily/zotero-arxiv-daily/.venv/lib/python3.***/site-packages/huggingface_hub/file_download.py", line ***376, in _get_metadata_or_catch_error
    metadata = get_hf_file_metadata(
               ^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/zotero-arxiv-daily/zotero-arxiv-daily/.venv/lib/python3.***/site-packages/huggingface_hub/utils/_validators.py", line ***4, in _inner_fn
    return fn(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/zotero-arxiv-daily/zotero-arxiv-daily/.venv/lib/python3.***/site-packages/huggingface_hub/file_download.py", line ***296, in get_hf_file_metadata
    r = _request_wrapper(
        ^^^^^^^^^^^^^^^^^
  File "/home/runner/work/zotero-arxiv-daily/zotero-arxiv-daily/.venv/lib/python3.***/site-packages/huggingface_hub/file_download.py", line 277, in _request_wrapper
    response = _request_wrapper(
               ^^^^^^^^^^^^^^^^^
  File "/home/runner/work/zotero-arxiv-daily/zotero-arxiv-daily/.venv/lib/python3.***/site-packages/huggingface_hub/file_download.py", line 30***, in _request_wrapper
    hf_raise_for_status(response)
  File "/home/runner/work/zotero-arxiv-daily/zotero-arxiv-daily/.venv/lib/python3.***/site-packages/huggingface_hub/utils/_http.py", line 477, in hf_raise_for_status
    raise _format(HfHubHTTPError, str(e), response) from e
huggingface_hub.errors.HfHubHTTPError: 429 Client Error: Too Many Requests for url: https://huggingface.co/avsolatorio/GIST-small-Embedding-v0/resolve/main/config.json
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "/home/runner/work/zotero-arxiv-daily/zotero-arxiv-daily/.venv/lib/python3.***/site-packages/transformers/utils/hub.py", line 403, in cached_file
    resolved_file = hf_hub_download(
                    ^^^^^^^^^^^^^^^^
  File "/home/runner/work/zotero-arxiv-daily/zotero-arxiv-daily/.venv/lib/python3.***/site-packages/huggingface_hub/utils/_validators.py", line ***4, in _inner_fn
    return fn(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/zotero-arxiv-daily/zotero-arxiv-daily/.venv/lib/python3.***/site-packages/huggingface_hub/file_download.py", line 862, in hf_hub_download
    return _hf_hub_download_to_cache_dir(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/zotero-arxiv-daily/zotero-arxiv-daily/.venv/lib/python3.***/site-packages/huggingface_hub/file_download.py", line 969, in _hf_hub_download_to_cache_dir
    _raise_on_head_call_error(head_call_error, force_download, local_files_only)
  File "/home/runner/work/zotero-arxiv-daily/zotero-arxiv-daily/.venv/lib/python3.***/site-packages/huggingface_hub/file_download.py", line ***487, in _raise_on_head_call_error
    raise LocalEntryNotFoundError(
huggingface_hub.errors.LocalEntryNotFoundError: An error happened while trying to locate the file on the Hub and we cannot find the requested files in the local cache. Please check your connection and try again or make sure your Internet connection is on.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "/home/runner/work/zotero-arxiv-daily/zotero-arxiv-daily/main.py", line ***72, in <module>
    papers = rerank_paper(papers, corpus)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/zotero-arxiv-daily/zotero-arxiv-daily/recommender.py", line 7, in rerank_paper
    encoder = SentenceTransformer(model)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/zotero-arxiv-daily/zotero-arxiv-daily/.venv/lib/python3.***/site-packages/sentence_transformers/SentenceTransformer.py", line 320, in __init__
    modules = self._load_auto_model(
              ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/zotero-arxiv-daily/zotero-arxiv-daily/.venv/lib/python3.***/site-packages/sentence_transformers/SentenceTransformer.py", line ***528, in _load_auto_model
    transformer_model = Transformer(
                        ^^^^^^^^^^^^
  File "/home/runner/work/zotero-arxiv-daily/zotero-arxiv-daily/.venv/lib/python3.***/site-packages/sentence_transformers/models/Transformer.py", line 77, in __init__
    config = self._load_config(model_name_or_path, cache_dir, backend, config_args)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/zotero-arxiv-daily/zotero-arxiv-daily/.venv/lib/python3.***/site-packages/sentence_transformers/models/Transformer.py", line ***28, in _load_config
    return AutoConfig.from_pretrained(model_name_or_path, **config_args, cache_dir=cache_dir)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/zotero-arxiv-daily/zotero-arxiv-daily/.venv/lib/python3.***/site-packages/transformers/models/auto/configuration_auto.py", line ***7, in from_pretrained
    config_dict, unused_kwargs = PretrainedConfig.get_config_dict(pretrained_model_name_or_path, **kwargs)
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/zotero-arxiv-daily/zotero-arxiv-daily/.venv/lib/python3.***/site-packages/transformers/configuration_utils.py", line 574, in get_config_dict
    config_dict, kwargs = cls._get_config_dict(pretrained_model_name_or_path, **kwargs)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/zotero-arxiv-daily/zotero-arxiv-daily/.venv/lib/python3.***/site-packages/transformers/configuration_utils.py", line 633, in _get_config_dict
    resolved_config_file = cached_file(
                           ^^^^^^^^^^^^
  File "/home/runner/work/zotero-arxiv-daily/zotero-arxiv-daily/.venv/lib/python3.***/site-packages/transformers/utils/hub.py", line 446, in cached_file
    raise EnvironmentError(
OSError: We couldn't connect to 'https://huggingface.co/' to load this file, couldn't find it in the cached files and it looks like avsolatorio/GIST-small-Embedding-v0 is not the path to a directory containing a file named config.json.
Checkout your internet connection or see how to run the library in offline mode at 'https://huggingface.co/docs/transformers/installation#offline-mode'.
Error: Process completed with exit code ***.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions