# Load\_dataset() loading csv file show error

**URL:** <https://discuss.huggingface.co/t/load-dataset-loading-csv-file-show-error/36094>\
**Category:** 🤗Datasets\
**Created:** [April 10, 2023, 7:16am UTC](https://discuss.huggingface.co/t/load-dataset-loading-csv-file-show-error/36094 "2023-04-10T07:16:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hexixi](https://avatars.discourse-cdn.com/v4/letter/h/47e85d/32.png) [@Hexixi](https://discuss.huggingface.co/u/Hexixi)\
**Post date:** [April 10, 2023, 7:16am UTC](https://discuss.huggingface.co/t/load-dataset-loading-csv-file-show-error/36094/1 "2023-04-10T07:16:17Z")

</div>

data1 = load\_dataset(“csv”, data\_files= [“dataset/train.csv”])  
or  
data1 = load\_dataset(“csv”, data\_files= ‘dataset/train.csv’)

They show the same error：  
raise DatasetGenerationError(“An error occurred while generating the dataset”) from e  
datasets.builder.DatasetGenerationError: An error occurred while generating the dataset

---

<div class="post-metadata">

**Author:** ![mariosasko](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/mariosasko/32/31548_2.png) [@mariosasko](https://discuss.huggingface.co/u/mariosasko)\
**Post date:** [April 11, 2023, 12:52pm UTC](https://discuss.huggingface.co/t/load-dataset-loading-csv-file-show-error/36094/2 "2023-04-11T12:52:19Z")

</div>

Can you please paste the entire error stack trace, not only the end of it?

---

<div class="post-metadata">

**Author:** ![Hexixi](https://avatars.discourse-cdn.com/v4/letter/h/47e85d/32.png) [@Hexixi](https://discuss.huggingface.co/u/Hexixi)\
**Post date:** [April 26, 2023, 8:43am UTC](https://discuss.huggingface.co/t/load-dataset-loading-csv-file-show-error/36094/3 "2023-04-26T08:43:39Z")

</div>

thanks for your reply, i have already solved it.
