# HFValidationError

**URL:** <https://discuss.huggingface.co/t/hfvalidationerror/146677>\
**Category:** Beginners\
**Created:** [March 20, 2025, 4:39pm UTC](https://discuss.huggingface.co/t/hfvalidationerror/146677 "2025-03-20T16:39:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![leo696969](https://avatars.discourse-cdn.com/v4/letter/l/58956e/32.png) [@leo696969](https://discuss.huggingface.co/u/leo696969)\
**Post date:** [March 20, 2025, 4:39pm UTC](https://discuss.huggingface.co/t/hfvalidationerror/146677/1 "2025-03-20T16:39:39Z")

</div>

import os

from datasets import load\_dataset

dataset = load\_dataset(“imdb”)

print(dataset)

‘’'I was trying above mentioned code … and it throws this error…

dataset = load\_dataset(“imdb”)  
File “C:\Users\Hp\AppData\Local\Programs\Python\Python313\Lib\site-packages\datasets\load.py”, line 2129, in load\_dataset  
builder\_instance = load\_dataset\_builder(  
path=path,  
…\<12 lines\>…  
\*\*config\_kwargs,  
)  
File “C:\Users\Hp\AppData\Local\Programs\Python\Python313\Lib\site-packages\datasets\load.py”, line 1849, in load\_dataset\_builder  
dataset\_module = dataset\_module\_factory(  
path,  
…\<8 lines\>…  
\_require\_custom\_configs=bool(config\_kwargs),  
)  
File “C:\Users\Hp\AppData\Local\Programs\Python\Python313\Lib\site-packages\datasets\load.py”, line 1731, in dataset\_module\_factory  
raise e1 from None  
File “C:\Users\Hp\AppData\Local\Programs\Python\Python313\Lib\site-packages\datasets\load.py”, line 1696, in dataset\_module\_factory  
).get\_module()  
~~~~~~~~~~ ^^  
File “C:\Users\Hp\AppData\Local\Programs\Python\Python313\Lib\site-packages\datasets\load.py”, line 1019, in get\_module  
dataset\_card\_data = DatasetCard.load(dataset\_readme\_path).data  
~~~~~~~~~~~~~~~~ ^^^^^^^^^^^^^^^^^^^^^  
File “C:\Users\Hp\AppData\Local\Programs\Python\Python313\Lib\site-packages\huggingface\_hub\repocard.py”, line 178, in load  
hf\_hub\_download(  
~~~~~~~~~~~~~~~ ^  
repo\_id\_or\_path,  
^^^^^^^^^^^^^^^^  
…\<2 lines\>…  
token=token,  
^^^^^^^^^^^^  
)  
^  
File “C:\Users\Hp\AppData\Local\Programs\Python\Python313\Lib\site-packages\huggingface\_hub\utils\_validators.py”, line 106, in _inner\_fn  
validate\_repo\_id(arg\_value)  
~~~~~~~~~~~~~~~~ ^^^^^^^^^^^  
File “C:\Users\Hp\AppData\Local\Programs\Python\Python313\Lib\site-packages\huggingface\_hub\utils\_validators.py”, line 160, in validate\_repo\_id  
raise HFValidationError(  
…\<3 lines\>…  
)  
huggingface\_hub.errors.HFValidationError: Repo id must use alphanumeric chars or ‘-’, '_', ‘.’, ‘–’ and ‘..’ are forbidden, ‘-’ and ‘.’ cannot start or end the name, max length  
is 96: ‘C:\Users\Hp.cache\huggingface\hub\datasets–imdb\snapshots\e6281661ce1c48d982bc483cf8a173c1bbeb5d31\README.md’.

I would be thankful if you help me solving this

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [March 20, 2025, 4:51pm UTC](https://discuss.huggingface.co/t/hfvalidationerror/146677/2 "2025-03-20T16:51:11Z")

</div>

Hmm, that code works for me…  
Try:

```auto
pip install -U huggingface_hub datasets

```

---

<div class="post-metadata">

**Author:** ![leo696969](https://avatars.discourse-cdn.com/v4/letter/l/58956e/32.png) [@leo696969](https://discuss.huggingface.co/u/leo696969)\
**Post date:** [March 21, 2025, 2:19pm UTC](https://discuss.huggingface.co/t/hfvalidationerror/146677/3 "2025-03-21T14:19:52Z")

</div>

yeah I tried this… no change…

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [March 21, 2025, 2:43pm UTC](https://discuss.huggingface.co/t/hfvalidationerror/146677/4 "2025-03-21T14:43:12Z")

</div>

Hmm… How about this code?

```py
from datasets import load_dataset

#dataset = load_dataset("imdb")
dataset = load_dataset("stanfordnlp/imdb")

print(dataset)

```
