# An error occurred while generating the dataset

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fan-error-occurred-while-generating-the-dataset%2F100753%3E%5C
**Category:** 🤗Datasets\
**Created:** [August 3, 2024, 8:58pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fan-error-occurred-while-generating-the-dataset%2F100753 "2024-08-03T20:58:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![SGGHub](https://avatars.discourse-cdn.com/v4/letter/s/7ea924/32.png) [@SGGHub](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FSGGHub)%5C
**Post date:** [August 3, 2024, 8:58pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fan-error-occurred-while-generating-the-dataset%2F100753%2F1 "2024-08-03T20:58:40Z")

</div>

I’m trying to load the common voice 17 HU dataset, but I always get an error when it gets to generating examples, the error:

Extracting data files: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 6/6 [00:00\<00:00, 114.46it/s]  
Reading metadata…: 37140it [00:00, 133407.71it/s]es/s]  
Generating train split: 0 examples [00:00, ? examples/s]Traceback (most recent call last):  
File “C:\Users\tothg\AppData\Local\Programs\Python\Python312\Lib\site-packages\datasets\builder.py”, line 1627, in \_prepare\_split\_single  
example = self.info.features.encode\_example(record) if self.info.features is not None else record  
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  
File “C:\Users\tothg\AppData\Local\Programs\Python\Python312\Lib\site-packages\datasets\features\features.py”, line 1813, in encode\_example  
return encode\_nested\_example(self, example)  
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  
File “C:\Users\tothg\AppData\Local\Programs\Python\Python312\Lib\site-packages\datasets\features\features.py”, line 1212, in encode\_nested\_example  
{  
File “C:\Users\tothg\AppData\Local\Programs\Python\Python312\Lib\site-packages\datasets\utils\py\_utils.py”, line 302, in zip\_dict  
yield key, tuple(d[key] for d in dicts)  
^^^^^^^^^^^^^^^^^^^^^^^^^^^^  
File “C:\Users\tothg\AppData\Local\Programs\Python\Python312\Lib\site-packages\datasets\utils\py\_utils.py”, line 302, in   
yield key, tuple(d[key] for d in dicts)  
~^^^^^  
KeyError: ‘sentence\_id’

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

Traceback (most recent call last):  
File “E:\torch-directml\dl\_dataset.py”, line 3, in   
train = load\_dataset(“mozilla-foundation/common\_voice\_17\_0”, “hu”, use\_auth\_token=“”)  
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  
File “C:\Users\tothg\AppData\Local\Programs\Python\Python312\Lib\site-packages\datasets\load.py”, line 1791, in load\_dataset  
builder\_instance.download\_and\_prepare(  
File “C:\Users\tothg\AppData\Local\Programs\Python\Python312\Lib\site-packages\datasets\builder.py”, line 891, in download\_and\_prepare  
self.\_download\_and\_prepare(  
File “C:\Users\tothg\AppData\Local\Programs\Python\Python312\Lib\site-packages\datasets\builder.py”, line 1651, in \_download\_and\_prepare  
super().\_download\_and\_prepare(  
File “C:\Users\tothg\AppData\Local\Programs\Python\Python312\Lib\site-packages\datasets\builder.py”, line 986, in \_download\_and\_prepare  
self.\_prepare\_split(split\_generator, \*\*prepare\_split\_kwargs)  
File “C:\Users\tothg\AppData\Local\Programs\Python\Python312\Lib\site-packages\datasets\builder.py”, line 1490, in \_prepare\_split  
for job\_id, done, content in self.\_prepare\_split\_single(  
File “C:\Users\tothg\AppData\Local\Programs\Python\Python312\Lib\site-packages\datasets\builder.py”, line 1646, in \_prepare\_split\_single  
raise DatasetGenerationError(“An error occurred while generating the dataset”) from e  
datasets.builder.DatasetGenerationError: An error occurred while generating the dataset

The code is just:  
from datasets import load\_dataset

train = load\_dataset(“mozilla-foundation/common\_voice\_17\_0”, “hu”, use\_auth\_token=“”)

---

<div class="post-metadata">

**Author:** ![severo](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/severo/32/27449_2.png) [@severo](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fsevero)%5C
**Post date:** [August 8, 2024, 10:14am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fan-error-occurred-while-generating-the-dataset%2F100753%2F2 "2024-08-08T10:14:51Z")

</div>

cc @albertvillanova
