Error Loading the Dataset

#2
by javiimts - opened

I'm facing an issue when trying to load the dataset using the datasets library.

My code is:

from datasets import load_dataset

corts_val = load_dataset(
    "projecte-aina/commonvoice_benchmark_catalan_accents",
    None,
    trust_remote_code=True,
)

My datasets version is 3.6.0

It raises the following error:

Downloading data:   0%|                                                                                                            | 0/46 [00:00<?, ?files/s]
Traceback (most recent call last):
  File ".../styletts2-valenciano/t2/.venv2/lib/python3.10/site-packages/huggingface_hub/utils/_http.py", line 550, in hf_raise_for_status
    response.raise_for_status()
  File ".../styletts2-valenciano/t2/.venv2/lib/python3.10/site-packages/httpx/_models.py", line 829, in raise_for_status
    raise HTTPStatusError(message, request=request, response=self)
httpx.HTTPStatusError: Client error '404 Not Found' for url 'https://huggingface.co/datasets/mozilla-foundation/common_voice_17_0/resolve/main/audio/ca/validated/ca_validated_0.tar'
For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/404

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File ".../styletts2-valenciano/t2/.venv2/lib/python3.10/site-packages/datasets/utils/file_utils.py", line 191, in cached_path
    output_path = huggingface_hub.HfApi(
  File ".../styletts2-valenciano/t2/.venv2/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 89, in _inner_fn
    return fn(*args, **kwargs)
  File ".../styletts2-valenciano/t2/.venv2/lib/python3.10/site-packages/huggingface_hub/hf_api.py", line 5280, in hf_hub_download
    return hf_hub_download(
  File ".../styletts2-valenciano/t2/.venv2/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 89, in _inner_fn
    return fn(*args, **kwargs)
  File ".../styletts2-valenciano/t2/.venv2/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 991, in hf_hub_download
    return _hf_hub_download_to_cache_dir(
  File ".../styletts2-valenciano/t2/.venv2/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 1064, in _hf_hub_download_to_cache_dir
    (url_to_download, etag, commit_hash, expected_size, xet_file_data, head_call_error) = _get_metadata_or_catch_error(
  File ".../styletts2-valenciano/t2/.venv2/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 1602, in _get_metadata_or_catch_error
    metadata = get_hf_file_metadata(
  File ".../styletts2-valenciano/t2/.venv2/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 89, in _inner_fn
    return fn(*args, **kwargs)
  File ".../styletts2-valenciano/t2/.venv2/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 1528, in get_hf_file_metadata
    response = _httpx_follow_relative_redirects(method="HEAD", url=url, headers=hf_headers, timeout=timeout)
  File ".../styletts2-valenciano/t2/.venv2/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 291, in _httpx_follow_relative_redirects
    hf_raise_for_status(response)
  File ".../styletts2-valenciano/t2/.venv2/lib/python3.10/site-packages/huggingface_hub/utils/_http.py", line 564, in hf_raise_for_status
    raise _format(RemoteEntryNotFoundError, message, response) from e
huggingface_hub.errors.RemoteEntryNotFoundError: 404 Client Error. (Request ID: Root=1-690b613a-2b6c9af155bf78a16658edc0;c7c78e93-dd76-4c2a-95e0-1d97efd49979)

Entry Not Found for url: https://huggingface.co/datasets/mozilla-foundation/common_voice_17_0/resolve/main/audio/ca/validated/ca_validated_0.tar.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File ".../styletts2-valenciano/t2/dataset_exploration2.py", line 3, in <module>
    corts_val = load_dataset(
  File ".../styletts2-valenciano/t2/.venv2/lib/python3.10/site-packages/datasets/load.py", line 2084, in load_dataset
    builder_instance.download_and_prepare(
  File ".../styletts2-valenciano/t2/.venv2/lib/python3.10/site-packages/datasets/builder.py", line 925, in download_and_prepare
    self._download_and_prepare(
  File ".../styletts2-valenciano/t2/.venv2/lib/python3.10/site-packages/datasets/builder.py", line 1649, in _download_and_prepare
    super()._download_and_prepare(
  File ".../styletts2-valenciano/t2/.venv2/lib/python3.10/site-packages/datasets/builder.py", line 979, in _download_and_prepare
    split_generators = self._split_generators(dl_manager, **split_generators_kwargs)
  File "/media/datos1/tts-valenciano/huggingface/modules/datasets_modules/datasets/projecte-aina--commonvoice_benchmark_catalan_accents/d929557d3aa2fa05a83233ccb84b2982c71cf3a61552ed64469b4c2e09b328bc/commonvoice_benchmark_catalan_accents.py", line 171, in _split_generators
    audio_paths = dl_manager.download(hash_tar_files)
  File ".../styletts2-valenciano/t2/.venv2/lib/python3.10/site-packages/datasets/download/download_manager.py", line 159, in download
    downloaded_path_or_paths = map_nested(
  File ".../styletts2-valenciano/t2/.venv2/lib/python3.10/site-packages/datasets/utils/py_utils.py", line 504, in map_nested
    mapped = [
  File ".../styletts2-valenciano/t2/.venv2/lib/python3.10/site-packages/datasets/utils/py_utils.py", line 505, in <listcomp>
    map_nested(
  File ".../styletts2-valenciano/t2/.venv2/lib/python3.10/site-packages/datasets/utils/py_utils.py", line 521, in map_nested
    mapped = [
  File ".../styletts2-valenciano/t2/.venv2/lib/python3.10/site-packages/datasets/utils/py_utils.py", line 522, in <listcomp>
    _single_map_nested((function, obj, batched, batch_size, types, None, True, None))
  File ".../styletts2-valenciano/t2/.venv2/lib/python3.10/site-packages/datasets/utils/py_utils.py", line 390, in _single_map_nested
    return [mapped_item for batch in iter_batched(data_struct, batch_size) for mapped_item in function(batch)]
  File ".../styletts2-valenciano/t2/.venv2/lib/python3.10/site-packages/datasets/utils/py_utils.py", line 390, in <listcomp>
    return [mapped_item for batch in iter_batched(data_struct, batch_size) for mapped_item in function(batch)]
  File ".../styletts2-valenciano/t2/.venv2/lib/python3.10/site-packages/datasets/download/download_manager.py", line 206, in _download_batched
    return thread_map(
  File ".../styletts2-valenciano/t2/.venv2/lib/python3.10/site-packages/tqdm/contrib/concurrent.py", line 69, in thread_map
    return _executor_map(ThreadPoolExecutor, fn, *iterables, **tqdm_kwargs)
  File ".../styletts2-valenciano/t2/.venv2/lib/python3.10/site-packages/tqdm/contrib/concurrent.py", line 51, in _executor_map
    return list(tqdm_class(ex.map(fn, *iterables, chunksize=chunksize), **kwargs))
  File ".../styletts2-valenciano/t2/.venv2/lib/python3.10/site-packages/tqdm/std.py", line 1181, in __iter__
    for obj in iterable:
  File ".../.local/share/uv/python/cpython-3.10.19-linux-x86_64-gnu/lib/python3.10/concurrent/futures/_base.py", line 621, in result_iterator
    yield _result_or_cancel(fs.pop())
  File ".../.local/share/uv/python/cpython-3.10.19-linux-x86_64-gnu/lib/python3.10/concurrent/futures/_base.py", line 319, in _result_or_cancel
    return fut.result(timeout)
  File ".../.local/share/uv/python/cpython-3.10.19-linux-x86_64-gnu/lib/python3.10/concurrent/futures/_base.py", line 458, in result
    return self.__get_result()
  File ".../.local/share/uv/python/cpython-3.10.19-linux-x86_64-gnu/lib/python3.10/concurrent/futures/_base.py", line 403, in __get_result
    raise self._exception
  File ".../.local/share/uv/python/cpython-3.10.19-linux-x86_64-gnu/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File ".../styletts2-valenciano/t2/.venv2/lib/python3.10/site-packages/datasets/download/download_manager.py", line 229, in _download_single
    out = cached_path(url_or_filename, download_config=download_config)
  File ".../styletts2-valenciano/t2/.venv2/lib/python3.10/site-packages/datasets/utils/file_utils.py", line 211, in cached_path
    raise FileNotFoundError(str(e)) from e
FileNotFoundError: 404 Client Error. (Request ID: Root=1-690b613a-2b6c9af155bf78a16658edc0;c7c78e93-dd76-4c2a-95e0-1d97efd49979)

Moreover, when going to https://huggingface.co/datasets/mozilla-foundation/common_voice_17_0/blob/main/README.md states the following so I think it may be related to that:

"Effective October 2025, Mozilla Common Voice datasets are now exclusively available through Mozilla Data Collective. You can learn more about this change here."

It seems this is due to the Mozilla Common Voice datasets being moved to the Mozilla Data Collective (October 2025). The script may need an update to point to the new source.

Sign up or log in to comment