Datasets:
TypeError when loading the subset
#11
by
Borrison
- opened
Code to reproduce the error:ds = load_dataset("Helsinki-NLP/europarl", "en-fr", data_files={"train": "en-fr/*"}, split="train")
Error Message:
File "/opt/conda/envs/base/lib/python3.9/site-packages/datasets/table.py", line 2026, in array_cast
raise TypeError(f"Couldn't cast array of type\n{array.type}\nto\n{pa_type}")
TypeError: Couldn't cast array of type
struct<en: string, fr: string>
to
struct<bg: string, cs: string>
Environment:
datasets==2.13.1
Hi @Borrison ,
Could you please:
- First, update your
datasets
library:pip install -U datasets
- Second, load the dataset with this command instead:
ds = load_dataset("Helsinki-NLP/europarl", "en-fr", split="train")