Datasets:

ArXiv:

Missing file in dataset

#1
by benbogart - opened

When I try to load this dataset, I get the following error:
FileNotFoundError: Couldn't find file at https://huggingface.co/datasets/paren8esis/S4A/resolve/main/data/2019/31TCJ/2019_31TCJ_patch_18_19.nc

Here is the full traceback.
```

FileNotFoundError Traceback (most recent call last)
Cell In[2], line 3
1 from datasets import load_dataset
----> 3 dataset = load_dataset("paren8esis/S4A")
4 dataset

File /opt/homebrew/Caskroom/miniforge/base/envs/geospatial/lib/python3.11/site-packages/datasets/load.py:2153, in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, verification_mode, ignore_verifications, keep_in_memory, save_infos, revision, token, use_auth_token, task, streaming, num_proc, storage_options, **config_kwargs)
2150 try_from_hf_gcs = path not in _PACKAGED_DATASETS_MODULES
2152 # Download and prepare data
-> 2153 builder_instance.download_and_prepare(
2154 download_config=download_config,
2155 download_mode=download_mode,
2156 verification_mode=verification_mode,
2157 try_from_hf_gcs=try_from_hf_gcs,
2158 num_proc=num_proc,
2159 storage_options=storage_options,
2160 )
2162 # Build dataset for splits
2163 keep_in_memory = (
2164 keep_in_memory if keep_in_memory is not None else is_small_dataset(builder_instance.info.dataset_size)
2165 )

File /opt/homebrew/Caskroom/miniforge/base/envs/geospatial/lib/python3.11/site-packages/datasets/builder.py:954, in DatasetBuilder.download_and_prepare(self, output_dir, download_config, download_mode, verification_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, file_format, max_shard_size, num_proc, storage_options, **download_and_prepare_kwargs)
952 if num_proc is not None:
953 prepare_split_kwargs["num_proc"] = num_proc
--> 954 self._download_and_prepare(
955 dl_manager=dl_manager,
956 verification_mode=verification_mode,
957 **prepare_split_kwargs,
958 **download_and_prepare_kwargs,
959 )
960 # Sync info
961 self.info.dataset_size = sum(split.num_bytes for split in self.info.splits.values())

File /opt/homebrew/Caskroom/miniforge/base/envs/geospatial/lib/python3.11/site-packages/datasets/builder.py:1717, in GeneratorBasedBuilder._download_and_prepare(self, dl_manager, verification_mode, **prepare_splits_kwargs)
1716 def _download_and_prepare(self, dl_manager, verification_mode, **prepare_splits_kwargs):
-> 1717 super()._download_and_prepare(
1718 dl_manager,
1719 verification_mode,
1720 check_duplicate_keys=verification_mode == VerificationMode.BASIC_CHECKS
1721 or verification_mode == VerificationMode.ALL_CHECKS,
1722 **prepare_splits_kwargs,
1723 )

File /opt/homebrew/Caskroom/miniforge/base/envs/geospatial/lib/python3.11/site-packages/datasets/builder.py:1027, in DatasetBuilder._download_and_prepare(self, dl_manager, verification_mode, **prepare_split_kwargs)
1025 split_dict = SplitDict(dataset_name=self.dataset_name)
1026 split_generators_kwargs = self._make_split_generators_kwargs(prepare_split_kwargs)
-> 1027 split_generators = self._split_generators(dl_manager, **split_generators_kwargs)
1029 # Checksums verification
1030 if verification_mode == VerificationMode.ALL_CHECKS and dl_manager.record_checksums:

File ~/.cache/huggingface/modules/datasets_modules/datasets/paren8esis--S4A/0c718a7694c083a651d41066046c733f6f9f187489b1fe1a51116b158099fb67/S4A.py:141, in S4A.split_generators(self, dl_manager)
139 for x_i in range(x + 1):
140 for y_i in range(y + 1):
--> 141 downloaded_paths = dl_manager.download(URL + f'/{year}' + f'/{tile}' + f'/{year}{tile}patch{str(x_i).zfill(2)}
{str(y_i).zfill(2)}.nc')
142 root_paths.append(downloaded_paths)
143 elif self.config.name == 'cat_2019':

File /opt/homebrew/Caskroom/miniforge/base/envs/geospatial/lib/python3.11/site-packages/datasets/download/download_manager.py:428, in DownloadManager.download(self, url_or_urls)
425 download_func = partial(self._download, download_config=download_config)
427 start_time = datetime.now()
--> 428 downloaded_path_or_paths = map_nested(
429 download_func,
430 url_or_urls,
431 map_tuple=True,
432 num_proc=download_config.num_proc,
433 disable_tqdm=not is_progress_bar_enabled(),
434 desc="Downloading data files",
435 )
436 duration = datetime.now() - start_time
437 logger.info(f"Downloading took {duration.total_seconds() // 60} min")

File /opt/homebrew/Caskroom/miniforge/base/envs/geospatial/lib/python3.11/site-packages/datasets/utils/py_utils.py:456, in map_nested(function, data_struct, dict_only, map_list, map_tuple, map_numpy, num_proc, parallel_min_length, types, disable_tqdm, desc)
454 # Singleton
455 if not isinstance(data_struct, dict) and not isinstance(data_struct, types):
--> 456 return function(data_struct)
458 disable_tqdm = disable_tqdm or not logging.is_progress_bar_enabled()
459 iterable = list(data_struct.values()) if isinstance(data_struct, dict) else data_struct

File /opt/homebrew/Caskroom/miniforge/base/envs/geospatial/lib/python3.11/site-packages/datasets/download/download_manager.py:454, in DownloadManager._download(self, url_or_filename, download_config)
451 if is_relative_path(url_or_filename):
452 # append the relative path to the base_path
453 url_or_filename = url_or_path_join(self._base_path, url_or_filename)
--> 454 return cached_path(url_or_filename, download_config=download_config)

File /opt/homebrew/Caskroom/miniforge/base/envs/geospatial/lib/python3.11/site-packages/datasets/utils/file_utils.py:182, in cached_path(url_or_filename, download_config, **download_kwargs)
178 url_or_filename = str(url_or_filename)
180 if is_remote_url(url_or_filename):
181 # URL, so get it from the cache (downloading if necessary)
--> 182 output_path = get_from_cache(
183 url_or_filename,
184 cache_dir=cache_dir,
185 force_download=download_config.force_download,
186 proxies=download_config.proxies,
187 resume_download=download_config.resume_download,
188 user_agent=download_config.user_agent,
189 local_files_only=download_config.local_files_only,
190 use_etag=download_config.use_etag,
191 max_retries=download_config.max_retries,
192 token=download_config.token,
193 ignore_url_params=download_config.ignore_url_params,
194 storage_options=download_config.storage_options,
195 download_desc=download_config.download_desc,
196 )
197 elif os.path.exists(url_or_filename):
198 # File, and it exists.
199 output_path = url_or_filename

File /opt/homebrew/Caskroom/miniforge/base/envs/geospatial/lib/python3.11/site-packages/datasets/utils/file_utils.py:596, in get_from_cache(url, cache_dir, force_download, proxies, etag_timeout, resume_download, user_agent, local_files_only, use_etag, max_retries, token, use_auth_token, ignore_url_params, storage_options, download_desc)
591 raise FileNotFoundError(
592 f"Cannot find the requested files in the cached path at {cache_path} and outgoing traffic has been"
593 " disabled. To enable file online look-ups, set 'local_files_only' to False."
594 )
595 elif response is not None and response.status_code == 404:
--> 596 raise FileNotFoundError(f"Couldn't find file at {url}")
597 _raise_if_offline_mode_is_enabled(f"Tried to reach {url}")
598 if head_error is not None:

FileNotFoundError: Couldn't find file at https://huggingface.co/datasets/paren8esis/S4A/resolve/main/data/2019/31TCJ/2019_31TCJ_patch_18_19.nc
```

OrionLab org

Hello,

Thank you for catching this. There was an error in the loading script. Could you please try again?

Your need to confirm your account before you can post a new comment.

Sign up or log in to comment