# I uploaded a dataset through huggface web interface. But i can't load it!

**URL:** <https://discuss.huggingface.co/t/i-uploaded-a-dataset-through-huggface-web-interface-but-i-cant-load-it/39731>\
**Category:** 🤗Datasets\
**Created:** [May 13, 2023, 8:08am UTC](https://discuss.huggingface.co/t/i-uploaded-a-dataset-through-huggface-web-interface-but-i-cant-load-it/39731 "2023-05-13T08:08:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![raygx](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/raygx/32/17328_2.png) [@raygx](https://discuss.huggingface.co/u/raygx)\
**Post date:** [May 13, 2023, 8:08am UTC](https://discuss.huggingface.co/t/i-uploaded-a-dataset-through-huggface-web-interface-but-i-cant-load-it/39731/1 "2023-05-13T08:08:06Z")

</div>

Dataset: raygx/NepaliTextCorpus  
Every package and modules are upto date

**ERROR Trace Below**  
Downloading and preparing dataset json/raygx–NepaliTextCorpus to /root/.cache/huggingface/datasets/raygx\_\_\_json/raygx–NepaliTextCorpus-172878a4edc47604/0.0.0/fe5dd6ea2639a6df622901539cb550cf8797e5a6b2dd7af1cf934bed8e233e6e…

Downloading data files: 100%  
1/1 [00:00\<00:00, 69.76it/s]  
Extracting data files: 100%  
1/1 [00:00\<00:00, 58.73it/s]

ValueErrorTraceback (most recent call last)  
File /usr/local/lib/python3.8/dist-packages/datasets/builder.py:1875, in ArrowBasedBuilder.\_prepare\_split\_single(self, gen\_kwargs, fpath, file\_format, max\_shard\_size, job\_id)  
1868 writer = writer\_class(  
1869 features=writer.\_features,  
1870 path=fpath.replace(“SSSSS”, f"{shard\_id:05d}“).replace(“JJJJJ”, f”{job\_id:05d}"),  
(…)  
1873 embed\_local\_files=embed\_local\_files,  
1874 )  
 → 1875 writer.write\_table(table)  
1876 num\_examples\_progress\_update += len(table)

File /usr/local/lib/python3.8/dist-packages/datasets/arrow\_writer.py:568, in ArrowWriter.write\_table(self, pa\_table, writer\_batch\_size)  
567 pa\_table = pa\_table.combine\_chunks()  
 → 568 pa\_table = table\_cast(pa\_table, self.\_schema)  
569 if self.embed\_local\_files:

File /usr/local/lib/python3.8/dist-packages/datasets/table.py:2290, in table\_cast(table, schema)  
2289 if table.schema != schema:  
 → 2290 return cast\_table\_to\_schema(table, schema)  
2291 elif table.schema.metadata != schema.metadata:

File /usr/local/lib/python3.8/dist-packages/datasets/table.py:2248, in cast\_table\_to\_schema(table, schema)  
2247 if sorted(table.column\_names) != sorted(features):  
 → 2248 raise ValueError(f"Couldn’t cast\n{table.schema}\nto\n{features}\nbecause column names don’t match")  
2249 arrays = [cast\_array\_to\_feature(table[name], feature) for name, feature in features.items()]

ValueError: Couldn’t cast  
\_data\_files: list\<item: struct\<filename: string\>\>  
child 0, item: struct\<filename: string\>  
child 0, filename: string  
\_fingerprint: string  
\_format\_columns: null  
\_format\_kwargs: struct\<\>  
\_format\_type: null  
\_indexes: struct\<\>  
\_output\_all\_columns: bool  
\_split: null  
to  
{‘builder\_name’: Value(dtype=‘null’, id=None), ‘citation’: Value(dtype=‘string’, id=None), ‘config\_name’: Value(dtype=‘null’, id=None), ‘dataset\_size’: Value(dtype=‘null’, id=None), ‘description’: Value(dtype=‘string’, id=None), ‘download\_checksums’: Value(dtype=‘null’, id=None), ‘download\_size’: Value(dtype=‘null’, id=None), ‘features’: {‘text’: {‘dtype’: Value(dtype=‘string’, id=None), ‘id’: Value(dtype=‘null’, id=None), ‘\_type’: Value(dtype=‘string’, id=None)}}, ‘homepage’: Value(dtype=‘string’, id=None), ‘license’: Value(dtype=‘string’, id=None), ‘post\_processed’: Value(dtype=‘null’, id=None), ‘post\_processing\_size’: Value(dtype=‘null’, id=None), ‘size\_in\_bytes’: Value(dtype=‘null’, id=None), ‘splits’: Value(dtype=‘null’, id=None), ‘supervised\_keys’: Value(dtype=‘null’, id=None), ‘task\_templates’: Value(dtype=‘null’, id=None), ‘version’: Value(dtype=‘null’, id=None)}  
because column names don’t match

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

DatasetGenerationErrorTraceback (most recent call last)  
File :4

File /usr/local/lib/python3.8/dist-packages/datasets/load.py:1791, 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, use\_auth\_token, task, streaming, num\_proc, storage\_options, \*\*config\_kwargs)  
1788 try\_from\_hf\_gcs = path not in \_PACKAGED\_DATASETS\_MODULES  
1790 # Download and prepare data  
 → 1791 builder\_instance.download\_and\_prepare(  
1792 download\_config=download\_config,  
1793 download\_mode=download\_mode,  
1794 verification\_mode=verification\_mode,  
1795 try\_from\_hf\_gcs=try\_from\_hf\_gcs,  
1796 num\_proc=num\_proc,  
1797 storage\_options=storage\_options,  
1798 )  
1800 # Build dataset for splits  
1801 keep\_in\_memory = (  
1802 keep\_in\_memory if keep\_in\_memory is not None else is\_small\_dataset(builder\_instance.info.dataset\_size)  
1803 )

File /usr/local/lib/python3.8/dist-packages/datasets/builder.py:891, 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)  
889 if num\_proc is not None:  
890 prepare\_split\_kwargs[“num\_proc”] = num\_proc  
 → 891 self.\_download\_and\_prepare(  
892 dl\_manager=dl\_manager,  
893 verification\_mode=verification\_mode,  
894 \*\*prepare\_split\_kwargs,  
895 \*\*download\_and\_prepare\_kwargs,  
896 )  
897 # Sync info  
898 self.info.dataset\_size = sum(split.num\_bytes for split in self.info.splits.values())

File /usr/local/lib/python3.8/dist-packages/datasets/builder.py:986, in DatasetBuilder.\_download\_and\_prepare(self, dl\_manager, verification\_mode, \*\*prepare\_split\_kwargs)  
982 split\_dict.add(split\_generator.split\_info)  
984 try:  
985 # Prepare split will record examples associated to the split  
 → 986 self.\_prepare\_split(split\_generator, \*\*prepare\_split\_kwargs)  
987 except OSError as e:  
988 raise OSError(  
989 "Cannot find data file. "  
990 + (self.manual\_download\_instructions or “”)  
991 + “\nOriginal error:\n”  
992 + str(e)  
993 ) from None

File /usr/local/lib/python3.8/dist-packages/datasets/builder.py:1748, in ArrowBasedBuilder.\_prepare\_split(self, split\_generator, file\_format, num\_proc, max\_shard\_size)  
1746 job\_id = 0  
1747 with pbar:  
 → 1748 for job\_id, done, content in self.\_prepare\_split\_single(  
1749 gen\_kwargs=gen\_kwargs, job\_id=job\_id, \*\*\_prepare\_split\_args  
1750 ):  
1751 if done:  
1752 result = content

File /usr/local/lib/python3.8/dist-packages/datasets/builder.py:1893, in ArrowBasedBuilder.\_prepare\_split\_single(self, gen\_kwargs, fpath, file\_format, max\_shard\_size, job\_id)  
1891 if isinstance(e, SchemaInferenceError) and e. **context** is not None:  
1892 e = e. **context**  
 → 1893 raise DatasetGenerationError(“An error occurred while generating the dataset”) from e  
1895 yield job\_id, True, (total\_num\_examples, total\_num\_bytes, writer.\_features, num\_shards, shard\_lengths)

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:** [May 13, 2023, 1:34pm UTC](https://discuss.huggingface.co/t/i-uploaded-a-dataset-through-huggface-web-interface-but-i-cant-load-it/39731/2 "2023-05-13T13:34:19Z")

</div>

Hi! You should use `push_to_hub` to upload the dataset, not the files created by `save_to_disk`.

---

<div class="post-metadata">

**Author:** ![raygx](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/raygx/32/17328_2.png) [@raygx](https://discuss.huggingface.co/u/raygx)\
**Post date:** [May 14, 2023, 1:15am UTC](https://discuss.huggingface.co/t/i-uploaded-a-dataset-through-huggface-web-interface-but-i-cant-load-it/39731/3 "2023-05-14T01:15:24Z")

</div>

Thank you for the response…  
I tried to use push\_to\_hub() api, but it failed.  
I tried through kaggle Notebook and there was issue.

> something regarding the version, even though i ran !pip install transformers, datasets

I tried from my local and there was this issue.

> HfHubHTTPError: 403 Client Error: Forbidden for url: [https://huggingface.co/api/datasets/raygx/NepaliCorpus/commit/main](https://huggingface.co/api/datasets/raygx/NepaliCorpus/commit/main) (Request ID: Root=1-6460363c-68ba62ac562ca61a5260d4d4)  
> Forbidden: pass `create_pr=1` as a query parameter to create a Pull Request

Any Idea?

---

<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:** [May 14, 2023, 1:05pm UTC](https://discuss.huggingface.co/t/i-uploaded-a-dataset-through-huggface-web-interface-but-i-cant-load-it/39731/4 "2023-05-14T13:05:16Z")

</div>

You need to [login](https://huggingface.co/docs/huggingface_hub/v0.14.1/en/quick-start#login) to fix this error.
