Dataset Viewer issue: list index out of range

#1
by albertvillanova HF staff - opened

The dataset viewer is not working.

Error details:

Error code:   StreamingRowsError
Exception:    IndexError
Message:      list index out of range
Traceback:    Traceback (most recent call last):
                File "/src/services/worker/src/worker/utils.py", line 363, in get_rows_or_raise
                  return get_rows(
                File "/src/services/worker/src/worker/utils.py", line 305, in decorator
                  return func(*args, **kwargs)
                File "/src/services/worker/src/worker/utils.py", line 326, in get_rows
                  ds = load_dataset(
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 1790, in load_dataset
                  return builder_instance.as_streaming_dataset(split=split)
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1260, in as_streaming_dataset
                  splits_generators = {sg.name: sg for sg in self._split_generators(dl_manager)}
                File "/tmp/modules-cache/datasets_modules/datasets/pass/b57bb512f754a22fa29c793bf43286b4e70af2fecb16ce64124645c4fb9d7ca0/pass.py", line 79, in _split_generators
                  metadata = pd.read_csv(metadata_file, encoding="utf-8")
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/streaming.py", line 71, in wrapper
                  return function(*args, use_auth_token=use_auth_token, **kwargs)
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/download/streaming_download_manager.py", line 789, in xpandas_read_csv
                  return pd.read_csv(xopen(filepath_or_buffer, "rb", use_auth_token=use_auth_token), **kwargs)
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/download/streaming_download_manager.py", line 498, in xopen
                  file_obj = fsspec.open(file, mode=mode, *args, **kwargs).open()
                File "/src/services/worker/.venv/lib/python3.9/site-packages/fsspec/core.py", line 439, in open
                  return open_files(
                File "/src/services/worker/.venv/lib/python3.9/site-packages/fsspec/core.py", line 194, in __getitem__
                  out = super().__getitem__(item)
              IndexError: list index out of range

cc @albertvillanova

Note we get this error for source data files hosted on Zenodo.

See: https://github.com/huggingface/datasets/issues/5862

Sign up or log in to comment