Connection Error when Accessing Dataset URL on Hugging Face

I am currently experiencing an issue while trying to access my private dataset in my repo
for example: (

The error message I encountered is as follows:

ionError(f"Couldn't reach {url} ({repr(head_error)})")
ConnectionError: Couldn't reach (ConnectionError('Unauthorized for URL Please use the parameter `use_auth_token=True` after logging in with `huggingface-cli login`'))

Thank you in advance for your help!

You must log in as explained here and then pass use_auth_token=True to avoid this error.

PS: Newer datasets versions automatically read the token if it’s available in the environment, so the last step is optional.

same problem, even after logging in as indicated
the HF_TOKEN environment variable is set too (I try without set)

 A token is already saved on your machine. Run `huggingface-cli whoami` to get more information or `huggingface-cli logout` if you want to log out.
    Setting a new token will erase the existing one.
    To login, `huggingface_hub` requires a token generated from .
Token can be pasted using 'Right-Click'.
Add token as git credential? (Y/n)
Token is valid (permission: write).
Your token has been saved in your configured git credential helpers (manager).
Your token has been saved to C:\Users\XXXXXXXX\.cache\huggingface\token
Login successful

(.venv) P:\ia>datasets-cli test dd_tables/ --save_info --all_configs                      
p:\ia\.venv\lib\site-packages\datasets\ FutureWarning: The repository for dd_tables contains custom code which must be executed to correctly load the dataset. You can inspect the repository content at dd_tables/
You can avoid this message in future by passing the argument `trust_remote_code=True`.
Passing `trust_remote_code=True` will be mandatory to load this dataset from the next major release of `datasets`.
Loading Dataset Infos from C:\Users\broda\.cache\huggingface\modules\datasets_modules\datasets\dd_tables\0fad2ad8ca44d9919f0b749ed4322b6979f99bdfe7f31313738bd67ad699364c
Testing builder 'default' (1/1)
Generating dataset dd_tables (C:/Users/broda/.cache/huggingface/datasets/dd_tables/default/1.0.0)
Downloading and preparing dataset dd_tables/default to C:/Users/broda/.cache/huggingface/datasets/dd_tables/default/1.0.0...
Traceback (most recent call last):
  File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python39_64\lib\", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python39_64\lib\", line 87, in _run_code
    exec(code, run_globals)
  File "p:\ia\.venv\Scripts\datasets-cli.exe\", line 7, in <module>
  File "p:\ia\.venv\lib\site-packages\datasets\commands\", line 39, in main
  File "p:\ia\.venv\lib\site-packages\datasets\commands\", line 146, in run
  File "p:\ia\.venv\lib\site-packages\datasets\", line 1005, in download_and_prepare
  File "p:\ia\.venv\lib\site-packages\datasets\", line 1767, in _download_and_prepare
  File "p:\ia\.venv\lib\site-packages\datasets\", line 1078, in _download_and_prepare
    split_generators = self._split_generators(dl_manager, **split_generators_kwargs)
  File "C:\Users\broda\.cache\huggingface\modules\datasets_modules\datasets\dd_tables\0fad2ad8ca44d9919f0b749ed4322b6979f99bdfe7f31313738bd67ad699364c\", line 57, in _split_generators
    archive =
  File "p:\ia\.venv\lib\site-packages\datasets\download\", line 426, in download
    downloaded_path_or_paths = map_nested(
  File "p:\ia\.venv\lib\site-packages\datasets\utils\", line 459, in map_nested
    return function(data_struct)
  File "p:\ia\.venv\lib\site-packages\datasets\download\", line 451, in _download
    out = cached_path(url_or_filename, download_config=download_config)
  File "p:\ia\.venv\lib\site-packages\datasets\utils\", line 188, in cached_path
    output_path = get_from_cache(
  File "p:\ia\.venv\lib\site-packages\datasets\utils\", line 573, in get_from_cache
    raise ConnectionError(f"Couldn't reach {url} ({repr(head_error)})")
ConnectionError: Couldn't reach (ConnectionError('Unauthorized for URL Please use the parameter `token=True` after logging in with `huggingface-cli login`'))

I still have the issue

I have changed the Token key and it worked

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.