Skip to content

snapshot_download error after ~20% #3440

@satyrmipt

Description

@satyrmipt

Describe the bug

Im trying to find out why snapshot_download returns

RuntimeError: Data processing error: CAS service error : ReqwestMiddleware Error: Request failed after 5 retries

after some first successive load steps. I commented errors on different models:

snapshot_download(
    repo_id="Helsinki-NLP/opus-mt-ru-en", # failed at Fetching 11 files:  36%|███▋      | 4/11 [00:33<00:57,  8.28s/it]
    # repo_id="google-t5/t5-base",  # failed at Fetching 11 files:  27%|██▋       | 3/11 [01:12<03:13, 24.18s/it]
    # repo_id="google-t5/t5-small", # failed atFetching 20 files:  15%|█▌        | 3/20 [01:05<06:13, 21.95s/it]
    local_dir="./opus-mt-ru-en"
)

I also try to execute !hf download --repo-type model Helsinki-NLP/opus-mt-ru-en --local-dir ./opus-mt-ru-en
and the error was

File "C:\Users\my_user\AppData\Local\anaconda3\envs\vdl\Lib\site-packages\requests\adapters.py", line 675, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: (MaxRetryError("HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /api/models/Helsinki-NLP/opus-mt-ru-en/revision/main (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1016)')))"), '(Request ID: 42911224-7bda-43e2-92a2-e4c3984f7060)')

despity I tried every approach to turn off ssl verification i found on internet\deepseek.

After the snapshot_download failed i have the next files in destination folder:
13.10.2025 23:41

.
13.10.2025 23:41 ..
13.10.2025 23:41 .cache
13.10.2025 23:41 345 .gitattributes
13.10.2025 23:41 1 381 config.json
13.10.2025 23:41 293 generation_config.json
13.10.2025 23:41 3 159 README.md
13.10.2025 23:41 1 080 169 source.spm
13.10.2025 23:41 802 781 target.spm
13.10.2025 23:41 42 tokenizer_config.json
13.10.2025 23:41 2 601 758 vocab.json

Reproduction

import os
import ssl
os.environ['HF_HUB_DISABLE_SSL_VERIFICATION'] ='1'

Set environment variables to handle network issues

os.environ['HF_HUB_ENABLE_HF_TRANSFER'] ='1'
os.environ['HF_HUB_DISABLE_PROGRESS_BARS'] = ''
os.environ['HF_HUB_DISABLE_SYMLINKS_WARNING'] ='1'
os.environ['HF_DEBUG']='1'

Increase timeout and retry settings

os.environ['HF_HUB_DOWNLOAD_TIMEOUT'] = '120'
os.environ['REQUEST_TIMEOUT'] = '120'
import huggingface_hub
from huggingface_hub import snapshot_download

ssl_context = ssl.create_default_context()
ssl_context.check_hostname = False
ssl_context.verify_mode = ssl.CERT_NONE

import requests
from huggingface_hub import configure_http_backend

def backend_factory() -> requests.Session:
session = requests.Session()
session.verify = False
return session

configure_http_backend(backend_factory=backend_factory)

print('Some env variablese tham may be connected with sertificates:')
for key, value in os.environ.items():
if ('HF' in key) or ('SSL' in key) or ('CER' in key) or ('CA' in key) or ('BUN' in key) or ('PROX' in key):
print(f"{key}: {value}")
print(f"{ssl_context.verify_mode=}")
print(f"{ssl_context.check_hostname =}")

Download without SSL verification

snapshot_download(
repo_id="Helsinki-NLP/opus-mt-ru-en", # failed at Fetching 11 files: 36%|███▋ | 4/11 [00:33<00:57, 8.28s/it]
# repo_id="google-t5/t5-base", # failed at Fetching 11 files: 27%|██▋ | 3/11 [01:12<03:13, 24.18s/it]
# repo_id="google-t5/t5-small", # failed atFetching 20 files: 15%|█▌ | 3/20 [01:05<06:13, 21.95s/it]
local_dir="./opus-mt-ru-en"
)

Logs

Some env variablese tham may be connected with sertificates:
LOCALAPPDATA: C:\Users\my_user\AppData\Local
SSL_CERT_DIR: C:\Users\my_user\AppData\Local\anaconda3\envs\vdl\Library\ssl\certs
SSL_CERT_FILE: C:\Users\my_user\AppData\Local\anaconda3\envs\vdl\Library\ssl\cacert.pem
VSCODE_CODE_CACHE_PATH: C:\Users\my_user\AppData\Roaming\Code\CachedData\03c265b1adee71ac88f833e065f7bb956b60550a
VSCODE_HANDLES_UNCAUGHT_ERRORS: true
__CONDA_OPENSSL_CERT_DIR_SET: 1
__CONDA_OPENSSL_CERT_FILE_SET: 1
HF_HUB_DISABLE_SSL_VERIFICATION: 1
HF_HUB_ENABLE_HF_TRANSFER: 
HF_HUB_DISABLE_PROGRESS_BARS: 
HF_HUB_DISABLE_SYMLINKS_WARNING: 1
HF_DEBUG: 1
HF_HUB_DOWNLOAD_TIMEOUT: 120
ssl_context.verify_mode=<VerifyMode.CERT_NONE: 0>
ssl_context.check_hostname =False
c:\Users\my_user\AppData\Local\anaconda3\envs\vdl\Lib\site-packages\urllib3\connectionpool.py:1097: InsecureRequestWarning: Unverified HTTPS request is being made to host 'huggingface.co'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings
  warnings.warn(
Fetching 11 files:   0%|          | 0/11 [00:00<?, ?it/s]c:\Users\my_user\AppData\Local\anaconda3\envs\vdl\Lib\site-packages\urllib3\connectionpool.py:1097: InsecureRequestWarning: Unverified HTTPS request is being made to host 'huggingface.co'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings
  warnings.warn(
c:\Users\my_user\AppData\Local\anaconda3\envs\vdl\Lib\site-packages\urllib3\connectionpool.py:1097: InsecureRequestWarning: Unverified HTTPS request is being made to host 'huggingface.co'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings
  warnings.warn(
c:\Users\my_user\AppData\Local\anaconda3\envs\vdl\Lib\site-packages\urllib3\connectionpool.py:1097: InsecureRequestWarning: Unverified HTTPS request is being made to host 'huggingface.co'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings
  warnings.warn(
c:\Users\my_user\AppData\Local\anaconda3\envs\vdl\Lib\site-packages\urllib3\connectionpool.py:1097: InsecureRequestWarning: Unverified HTTPS request is being made to host 'huggingface.co'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings
  warnings.warn(
c:\Users\my_user\AppData\Local\anaconda3\envs\vdl\Lib\site-packages\urllib3\connectionpool.py:1097: InsecureRequestWarning: Unverified HTTPS request is being made to host 'huggingface.co'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings
  warnings.warn(
c:\Users\my_user\AppData\Local\anaconda3\envs\vdl\Lib\site-packages\urllib3\connectionpool.py:1097: InsecureRequestWarning: Unverified HTTPS request is being made to host 'huggingface.co'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings
  warnings.warn(
c:\Users\my_user\AppData\Local\anaconda3\envs\vdl\Lib\site-packages\urllib3\connectionpool.py:1097: InsecureRequestWarning: Unverified HTTPS request is being made to host 'huggingface.co'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings
  warnings.warn(
c:\Users\my_user\AppData\Local\anaconda3\envs\vdl\Lib\site-packages\urllib3\connectionpool.py:1097: InsecureRequestWarning: Unverified HTTPS request is being made to host 'huggingface.co'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings
  warnings.warn(
c:\Users\my_user\AppData\Local\anaconda3\envs\vdl\Lib\site-packages\urllib3\connectionpool.py:1097: InsecureRequestWarning: Unverified HTTPS request is being made to host 'huggingface.co'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings
  warnings.warn(
c:\Users\my_user\AppData\Local\anaconda3\envs\vdl\Lib\site-packages\urllib3\connectionpool.py:1097: InsecureRequestWarning: Unverified HTTPS request is being made to host 'huggingface.co'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings
  warnings.warn(
Downloading 'pytorch_model.bin' to 'opus-mt-ru-en\.cache\huggingface\download\Q1p2l2BzM1m6P5jKvr8WTq1TUio=.535450eb5613f3cc912f9ca3e54cfef6c14d201b319c24a88faf776a65538b5d.incomplete'
Xet Storage is enabled for this repo. Downloading file from Xet Storage..
Downloading 'rust_model.ot' to 'opus-mt-ru-en\.cache\huggingface\download\ee-WZw9U-e9t7gTGo9Yn82pHA_c=.5e910b59f7b030d38937da12f8d26a5ef48d5390131528fe08b1078e4dee4b2a.incomplete'
Xet Storage is enabled for this repo. Downloading file from Xet Storage..
c:\Users\my_user\AppData\Local\anaconda3\envs\vdl\Lib\site-packages\urllib3\connectionpool.py:1097: InsecureRequestWarning: Unverified HTTPS request is being made to host 'huggingface.co'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings
  warnings.warn(
c:\Users\my_user\AppData\Local\anaconda3\envs\vdl\Lib\site-packages\urllib3\connectionpool.py:1097: InsecureRequestWarning: Unverified HTTPS request is being made to host 'huggingface.co'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings
  warnings.warn(
c:\Users\my_user\AppData\Local\anaconda3\envs\vdl\Lib\site-packages\urllib3\connectionpool.py:1097: InsecureRequestWarning: Unverified HTTPS request is being made to host 'huggingface.co'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings
  warnings.warn(
c:\Users\my_user\AppData\Local\anaconda3\envs\vdl\Lib\site-packages\urllib3\connectionpool.py:1097: InsecureRequestWarning: Unverified HTTPS request is being made to host 'huggingface.co'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings
  warnings.warn(
c:\Users\my_user\AppData\Local\anaconda3\envs\vdl\Lib\site-packages\urllib3\connectionpool.py:1097: InsecureRequestWarning: Unverified HTTPS request is being made to host 'huggingface.co'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings
  warnings.warn(
Downloading '.gitattributes' to 'opus-mt-ru-en\.cache\huggingface\download\wPaCkH-WbT7GsmxMKKrNZTV4nSM=.dc08351d4dc0732d9c8af04070ced089b201ce2f.incomplete'
c:\Users\my_user\AppData\Local\anaconda3\envs\vdl\Lib\site-packages\urllib3\connectionpool.py:1097: InsecureRequestWarning: Unverified HTTPS request is being made to host 'huggingface.co'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings
  warnings.warn(
c:\Users\my_user\AppData\Local\anaconda3\envs\vdl\Lib\site-packages\urllib3\connectionpool.py:1097: InsecureRequestWarning: Unverified HTTPS request is being made to host 'huggingface.co'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings
  warnings.warn(
c:\Users\my_user\AppData\Local\anaconda3\envs\vdl\Lib\site-packages\urllib3\connectionpool.py:1097: InsecureRequestWarning: Unverified HTTPS request is being made to host 'huggingface.co'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings
  warnings.warn(
c:\Users\my_user\AppData\Local\anaconda3\envs\vdl\Lib\site-packages\urllib3\connectionpool.py:1097: InsecureRequestWarning: Unverified HTTPS request is being made to host 'huggingface.co'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings
  warnings.warn(
Downloading 'tf_model.h5' to 'opus-mt-ru-en\.cache\huggingface\download\a7eHxRFT3OeMBIFg52k2nfj5m7w=.b3c90598b2fdba7dbb59374b067287284331ddb8b297ee0f3770279a6bf5ff86.incomplete'
Downloading 'generation_config.json' to 'opus-mt-ru-en\.cache\huggingface\download\3EVKVggOldJcKSsGjSdoUCN1AyQ=.73c009f373594622ab49464e9c3b4e950bc3ac2d.incomplete'
Xet Storage is enabled for this repo. Downloading file from Xet Storage..
c:\Users\my_user\AppData\Local\anaconda3\envs\vdl\Lib\site-packages\urllib3\connectionpool.py:1097: InsecureRequestWarning: Unverified HTTPS request is being made to host 'huggingface.co'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings
  warnings.warn(
c:\Users\my_user\AppData\Local\anaconda3\envs\vdl\Lib\site-packages\urllib3\connectionpool.py:1097: InsecureRequestWarning: Unverified HTTPS request is being made to host 'huggingface.co'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings
  warnings.warn(
Download complete. Moving file to opus-mt-ru-en\.gitattributes
Downloading 'README.md' to 'opus-mt-ru-en\.cache\huggingface\download\Xn7B-BWUGOee2Y6hCZtEhtFu4BE=.86bf639a37e88b6bbc32917fffb1b24c2ea609f9.incomplete'
c:\Users\my_user\AppData\Local\anaconda3\envs\vdl\Lib\site-packages\urllib3\connectionpool.py:1097: InsecureRequestWarning: Unverified HTTPS request is being made to host 'huggingface.co'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings
  warnings.warn(
Fetching 11 files:   9%|| 1/11 [00:00<00:05,  1.75it/s]c:\Users\my_user\AppData\Local\anaconda3\envs\vdl\Lib\site-packages\urllib3\connectionpool.py:1097: InsecureRequestWarning: Unverified HTTPS request is being made to host 'huggingface.co'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings
  warnings.warn(
Download complete. Moving file to opus-mt-ru-en\generation_config.json
Download complete. Moving file to opus-mt-ru-en\README.md
c:\Users\my_user\AppData\Local\anaconda3\envs\vdl\Lib\site-packages\urllib3\connectionpool.py:1097: InsecureRequestWarning: Unverified HTTPS request is being made to host 'huggingface.co'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings
  warnings.warn(
c:\Users\my_user\AppData\Local\anaconda3\envs\vdl\Lib\site-packages\urllib3\connectionpool.py:1097: InsecureRequestWarning: Unverified HTTPS request is being made to host 'huggingface.co'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings
  warnings.warn(
Fetching 11 files:  36%|███▋      | 4/11 [00:35<01:02,  8.89s/it]
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
Cell In[1], line 37
     35 print(f"{ssl_context.check_hostname =}")
     36 # Download without SSL verification
---> 37 snapshot_download(
     38     repo_id="Helsinki-NLP/opus-mt-ru-en", # failed at Fetching 11 files:  36%|███▋      | 4/11 [00:33<00:57,  8.28s/it]
     39     # repo_id="google-t5/t5-base",  # failed at Fetching 11 files:  27%|██▋       | 3/11 [01:12<03:13, 24.18s/it]
     40     # repo_id="google-t5/t5-small", # failed atFetching 20 files:  15%|█▌        | 3/20 [01:05<06:13, 21.95s/it]
     41     local_dir="./opus-mt-ru-en"
     42 )

File c:\Usersmy_user\AppData\Local\anaconda3\envs\vdl\Lib\site-packages\huggingface_hub\utils\_validators.py:114, in validate_hf_hub_args.<locals>._inner_fn(*args, **kwargs)
    111 if check_use_auth_token:
    112     kwargs = smoothly_deprecate_use_auth_token(fn_name=fn.__name__, has_token=has_token, kwargs=kwargs)
--> 114 return fn(*args, **kwargs)

File c:\Usersmy_user\AppData\Local\anaconda3\envs\vdl\Lib\site-packages\huggingface_hub\_snapshot_download.py:332, in snapshot_download(repo_id, repo_type, revision, cache_dir, local_dir, library_name, library_version, user_agent, proxies, etag_timeout, force_download, token, local_files_only, allow_patterns, ignore_patterns, max_workers, tqdm_class, headers, endpoint, local_dir_use_symlinks, resume_download)
    330         _inner_hf_hub_download(file)
    331 else:
--> 332     thread_map(
    333         _inner_hf_hub_download,
    334         filtered_repo_files,
    335         desc=tqdm_desc,
    336         max_workers=max_workers,
    337         # User can use its own tqdm class or the default one from `huggingface_hub.utils`
    338         tqdm_class=tqdm_class or hf_tqdm,
    339     )
    341 if local_dir is not None:
    342     return str(os.path.realpath(local_dir))

File c:\Usersmy_user\AppData\Local\anaconda3\envs\vdl\Lib\site-packages\tqdm\contrib\concurrent.py:69, in thread_map(fn, *iterables, **tqdm_kwargs)
     55 """
     56 Equivalent of `list(map(fn, *iterables))`
     57 driven by `concurrent.futures.ThreadPoolExecutor`.
   (...)     66     [default: max(32, cpu_count() + 4)].
     67 """
     68 from concurrent.futures import ThreadPoolExecutor
---> 69 return _executor_map(ThreadPoolExecutor, fn, *iterables, **tqdm_kwargs)

File c:\Usersmy_user\AppData\Local\anaconda3\envs\vdl\Lib\site-packages\tqdm\contrib\concurrent.py:51, in _executor_map(PoolExecutor, fn, *iterables, **tqdm_kwargs)
     47 with ensure_lock(tqdm_class, lock_name=lock_name) as lk:
     48     # share lock in case workers are already using `tqdm`
     49     with PoolExecutor(max_workers=max_workers, initializer=tqdm_class.set_lock,
     50                       initargs=(lk,)) as ex:
---> 51         return list(tqdm_class(ex.map(fn, *iterables, chunksize=chunksize), **kwargs))

File c:\Usersmy_user\AppData\Local\anaconda3\envs\vdl\Lib\site-packages\tqdm\std.py:1181, in tqdm.__iter__(self)
   1178 time = self._time
   1180 try:
-> 1181     for obj in iterable:
   1182         yield obj
   1183         # Update and possibly print the progressbar.
   1184         # Note: does not call self.update(1) for speed optimisation.

File c:\Usersmy_user\AppData\Local\anaconda3\envs\vdl\Lib\concurrent\futures\_base.py:619, in Executor.map.<locals>.result_iterator()
    616 while fs:
    617     # Careful not to keep a reference to the popped future
    618     if timeout is None:
--> 619         yield _result_or_cancel(fs.pop())
    620     else:
    621         yield _result_or_cancel(fs.pop(), end_time - time.monotonic())

File c:\Usersmy_user\AppData\Local\anaconda3\envs\vdl\Lib\concurrent\futures\_base.py:317, in _result_or_cancel(***failed resolving arguments***)
    315 try:
    316     try:
--> 317         return fut.result(timeout)
    318     finally:
    319         fut.cancel()

File c:\Usersmy_user\AppData\Local\anaconda3\envs\vdl\Lib\concurrent\futures\_base.py:456, in Future.result(self, timeout)
    454     raise CancelledError()
    455 elif self._state == FINISHED:
--> 456     return self.__get_result()
    457 else:
    458     raise TimeoutError()

File c:\Usersmy_user\AppData\Local\anaconda3\envs\vdl\Lib\concurrent\futures\_base.py:401, in Future.__get_result(self)
    399 if self._exception:
    400     try:
--> 401         raise self._exception
    402     finally:
    403         # Break a reference cycle with the exception in self._exception
    404         self = None

File c:\Usersmy_user\AppData\Local\anaconda3\envs\vdl\Lib\concurrent\futures\thread.py:58, in _WorkItem.run(self)
     55     return
     57 try:
---> 58     result = self.fn(*self.args, **self.kwargs)
     59 except BaseException as exc:
     60     self.future.set_exception(exc)

File c:\Usersmy_user\AppData\Local\anaconda3\envs\vdl\Lib\site-packages\huggingface_hub\_snapshot_download.py:306, in snapshot_download.<locals>._inner_hf_hub_download(repo_file)
    305 def _inner_hf_hub_download(repo_file: str):
--> 306     return hf_hub_download(
    307         repo_id,
    308         filename=repo_file,
    309         repo_type=repo_type,
    310         revision=commit_hash,
    311         endpoint=endpoint,
    312         cache_dir=cache_dir,
    313         local_dir=local_dir,
    314         local_dir_use_symlinks=local_dir_use_symlinks,
    315         library_name=library_name,
    316         library_version=library_version,
    317         user_agent=user_agent,
    318         proxies=proxies,
    319         etag_timeout=etag_timeout,
    320         resume_download=resume_download,
    321         force_download=force_download,
    322         token=token,
    323         headers=headers,
    324     )

File c:\Usersmy_user\AppData\Local\anaconda3\envs\vdl\Lib\site-packages\huggingface_hub\utils\_validators.py:114, in validate_hf_hub_args.<locals>._inner_fn(*args, **kwargs)
    111 if check_use_auth_token:
    112     kwargs = smoothly_deprecate_use_auth_token(fn_name=fn.__name__, has_token=has_token, kwargs=kwargs)
--> 114 return fn(*args, **kwargs)

File c:\Usersmy_user\AppData\Local\anaconda3\envs\vdl\Lib\site-packages\huggingface_hub\file_download.py:990, in hf_hub_download(repo_id, filename, subfolder, repo_type, revision, library_name, library_version, cache_dir, local_dir, user_agent, force_download, proxies, etag_timeout, token, local_files_only, headers, endpoint, resume_download, force_filename, local_dir_use_symlinks)
    981     if local_dir_use_symlinks != "auto":
    982         warnings.warn(
    983             "`local_dir_use_symlinks` parameter is deprecated and will be ignored. "
    984             "The process to download files to a local folder has been updated and do "
   (...)    987             "For more details, check out https://huggingface.co/docs/huggingface_hub/main/en/guides/download#download-files-to-local-folder."
    988         )
--> 990     return _hf_hub_download_to_local_dir(
    991         # Destination
    992         local_dir=local_dir,
    993         # File info
    994         repo_id=repo_id,
    995         repo_type=repo_type,
    996         filename=filename,
    997         revision=revision,
    998         # HTTP info
    999         endpoint=endpoint,
   1000         etag_timeout=etag_timeout,
   1001         headers=hf_headers,
   1002         proxies=proxies,
   1003         token=token,
   1004         # Additional options
   1005         cache_dir=cache_dir,
   1006         force_download=force_download,
   1007         local_files_only=local_files_only,
   1008     )
   1009 else:
   1010     return _hf_hub_download_to_cache_dir(
   1011         # Destination
   1012         cache_dir=cache_dir,
   (...)   1026         force_download=force_download,
   1027     )

File c:\Usersmy_user\AppData\Local\anaconda3\envs\vdl\Lib\site-packages\huggingface_hub\file_download.py:1300, in _hf_hub_download_to_local_dir(local_dir, repo_id, repo_type, filename, revision, endpoint, etag_timeout, headers, proxies, token, cache_dir, force_download, local_files_only)
   1298 with WeakFileLock(paths.lock_path):
   1299     paths.file_path.unlink(missing_ok=True)  # delete outdated file first
-> 1300     _download_to_tmp_and_move(
   1301         incomplete_path=paths.incomplete_path(etag),
   1302         destination_path=paths.file_path,
   1303         url_to_download=url_to_download,
   1304         proxies=proxies,
   1305         headers=headers,
   1306         expected_size=expected_size,
   1307         filename=filename,
   1308         force_download=force_download,
   1309         etag=etag,
   1310         xet_file_data=xet_file_data,
   1311     )
   1313 write_download_metadata(local_dir=local_dir, filename=filename, commit_hash=commit_hash, etag=etag)
   1314 return str(paths.file_path)

File c:\Usersmy_user\AppData\Local\anaconda3\envs\vdl\Lib\site-packages\huggingface_hub\file_download.py:1723, in _download_to_tmp_and_move(incomplete_path, destination_path, url_to_download, proxies, headers, expected_size, filename, force_download, etag, xet_file_data)
   1721 if xet_file_data is not None and is_xet_available():
   1722     logger.debug("Xet Storage is enabled for this repo. Downloading file from Xet Storage..")
-> 1723     xet_get(
   1724         incomplete_path=incomplete_path,
   1725         xet_file_data=xet_file_data,
   1726         headers=headers,
   1727         expected_size=expected_size,
   1728         displayed_filename=filename,
   1729     )
   1730 else:
   1731     if xet_file_data is not None and not constants.HF_HUB_DISABLE_XET:

File c:\Usersmy_user\AppData\Local\anaconda3\envs\vdl\Lib\site-packages\huggingface_hub\file_download.py:629, in xet_get(incomplete_path, xet_file_data, headers, expected_size, displayed_filename, _tqdm_bar)
    626 def progress_updater(progress_bytes: float):
    627     progress.update(progress_bytes)
--> 629 download_files(
    630     xet_download_info,
    631     endpoint=connection_info.endpoint,
    632     token_info=(connection_info.access_token, connection_info.expiration_unix_epoch),
    633     token_refresher=token_refresher,
    634     progress_updater=[progress_updater],
    635 )

RuntimeError: Data processing error: CAS service error : ReqwestMiddleware Error: Request failed after 5 retries

System info

- huggingface_hub version: 0.35.3
- Platform: Windows-10-10.0.19045-SP0
- Python version: 3.11.13
- Running in iPython ?: Yes
- iPython shell: ZMQInteractiveShell
- Running in notebook ?: Yes
- Running in Google Colab ?: No
- Running in Google Colab Enterprise ?: No
- Token path ?: C:\Users\my_user\.cache\huggingface\token
- Has saved token ?: False
- FastAI: N/A
- Tensorflow: N/A
- Torch: 2.5.1
- Jinja2: 3.1.6
- Graphviz: N/A
- keras: N/A
- Pydot: N/A
- Pillow: 11.1.0
- hf_transfer: N/A
- gradio: N/A
- tensorboard: N/A
- numpy: 2.0.1
- pydantic: 2.11.9
- aiohttp: 3.12.15
- hf_xet: 1.1.8
- ENDPOINT: https://huggingface.co
- HF_HUB_CACHE: C:\Users\my_user\.cache\huggingface\hub
- HF_ASSETS_CACHE: C:\Users\my_user\.cache\huggingface\assets
- HF_TOKEN_PATH: C:\Users\my_user\.cache\huggingface\token
- HF_STORED_TOKENS_PATH: C:\Users\my_user\.cache\huggingface\stored_tokens
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: False
- HF_HUB_DISABLE_SYMLINKS_WARNING: True
- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_DISABLE_XET: False
- HF_HUB_ENABLE_HF_TRANSFER: False
- HF_HUB_ETAG_TIMEOUT: 10
- HF_HUB_DOWNLOAD_TIMEOUT: 120

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions