# Cannot user load\_dataset in Google colab

**URL:** <https://discuss.huggingface.co/t/cannot-user-load-dataset-in-google-colab/83525>\
**Category:** 🤗Datasets\
**Created:** [April 24, 2024, 11:08am UTC](https://discuss.huggingface.co/t/cannot-user-load-dataset-in-google-colab/83525 "2024-04-24T11:08:45Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![yicli-2lh](https://avatars.discourse-cdn.com/v4/letter/y/bb73d2/32.png) [@yicli-2lh](https://discuss.huggingface.co/u/yicli-2lh)\
**Post date:** [April 24, 2024, 11:08am UTC](https://discuss.huggingface.co/t/cannot-user-load-dataset-in-google-colab/83525/1 "2024-04-24T11:08:46Z")

</div>

Hi all,

I just want to use Google colab to test my code while I suddenly found I cannot load dataset anymore.  
The code is pretty simple and I have already login in the notebook. What should I now?

```auto
from datasets import load_dataset

# based on config
raw_datasets = load_dataset("HuggingFaceH4/ultrachat_200k")

```

* * *

TypeError Traceback (most recent call last)  
 in \<cell line: 4\>()  
2  
3 # based on config  
----\> 4 raw\_datasets = load\_dataset(“HuggingFaceH4/ultrachat\_200k”)

18 frames  
/usr/local/lib/python3.10/dist-packages/datasets/load.py 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, token, use\_auth\_token, task, streaming, num\_proc, storage\_options, trust\_remote\_code, \*\*config\_kwargs)  
2607  
2608 # Download and prepare data  
 → 2609 builder\_instance.download\_and\_prepare(  
2610 download\_config=download\_config,  
2611 download\_mode=download\_mode,

/usr/local/lib/python3.10/dist-packages/datasets/builder.py in 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)  
1025 if num\_proc is not None:  
1026 prepare\_split\_kwargs[“num\_proc”] = num\_proc  
 → 1027 self.\_download\_and\_prepare(  
1028 dl\_manager=dl\_manager,  
1029 verification\_mode=verification\_mode,

/usr/local/lib/python3.10/dist-packages/datasets/builder.py in \_download\_and\_prepare(self, dl\_manager, verification\_mode, \*\*prepare\_split\_kwargs)  
1098 split\_dict = SplitDict(dataset\_name=self.dataset\_name)  
1099 split\_generators\_kwargs = self.\_make\_split\_generators\_kwargs(prepare\_split\_kwargs)  
 → 1100 split\_generators = self.\_split\_generators(dl\_manager, \*\*split\_generators\_kwargs)  
1101  
1102 # Checksums verification

/usr/local/lib/python3.10/dist-packages/datasets/packaged\_modules/parquet/parquet.py in \_split\_generators(self, dl\_manager)  
42 raise ValueError(f"At least one data file must be specified, but got data\_files={self.config.data\_files}")  
43 dl\_manager.download\_config.extract\_on\_the\_fly = True  
—\> 44 data\_files = dl\_manager.download\_and\_extract(self.config.data\_files)  
45 if isinstance(data\_files, (str, list, tuple)):  
46 files = data\_files

/usr/local/lib/python3.10/dist-packages/datasets/download/download\_manager.py in download\_and\_extract(self, url\_or\_urls)  
432 extracted\_path(s): `str`, extracted paths of given URL(s).  
433 “”"  
 → 434 return self.extract(self.download(url\_or\_urls))  
435  
436 def get\_recorded\_sizes\_checksums(self):

/usr/local/lib/python3.10/dist-packages/datasets/download/download\_manager.py in download(self, url\_or\_urls)  
255 start\_time = datetime.now()  
256 with stack\_multiprocessing\_download\_progress\_bars():  
 → 257 downloaded\_path\_or\_paths = map\_nested(  
258 download\_func,  
259 url\_or\_urls,

/usr/local/lib/python3.10/dist-packages/datasets/utils/py\_utils.py in map\_nested(function, data\_struct, dict\_only, map\_list, map\_tuple, map\_numpy, num\_proc, parallel\_min\_length, batched, batch\_size, types, disable\_tqdm, desc)  
506 batch\_size = max(len(iterable) // num\_proc + int(len(iterable) % num\_proc \> 0), 1)  
507 iterable = list(iter\_batched(iterable, batch\_size))  
 → 508 mapped = [  
509 \_single\_map\_nested((function, obj, batched, batch\_size, types, None, True, None))  
510 for obj in hf\_tqdm(iterable, disable=disable\_tqdm, desc=desc)

/usr/local/lib/python3.10/dist-packages/datasets/utils/py\_utils.py in (.0)  
507 iterable = list(iter\_batched(iterable, batch\_size))  
508 mapped = [  
 → 509 \_single\_map\_nested((function, obj, batched, batch\_size, types, None, True, None))  
510 for obj in hf\_tqdm(iterable, disable=disable\_tqdm, desc=desc)  
511 ]

/usr/local/lib/python3.10/dist-packages/datasets/utils/py\_utils.py in \_single\_map\_nested(args)  
394 }  
395 else:  
 → 396 mapped = [\_single\_map\_nested((function, v, batched, batch\_size, types, None, True, None)) for v in pbar]  
397 if isinstance(data\_struct, list):  
398 return mapped

/usr/local/lib/python3.10/dist-packages/datasets/utils/py\_utils.py in (.0)  
394 }  
395 else:  
 → 396 mapped = [\_single\_map\_nested((function, v, batched, batch\_size, types, None, True, None)) for v in pbar]  
397 if isinstance(data\_struct, list):  
398 return mapped

/usr/local/lib/python3.10/dist-packages/datasets/utils/py\_utils.py in \_single\_map\_nested(args)  
375 and all(not isinstance(v, types) for v in data\_struct)  
376 ):  
 → 377 return [mapped\_item for batch in iter\_batched(data\_struct, batch\_size) for mapped\_item in function(batch)]  
378  
379 # Reduce logging to keep things readable in multiprocessing with tqdm

/usr/local/lib/python3.10/dist-packages/datasets/utils/py\_utils.py in (.0)  
375 and all(not isinstance(v, types) for v in data\_struct)  
376 ):  
 → 377 return [mapped\_item for batch in iter\_batched(data\_struct, batch\_size) for mapped\_item in function(batch)]  
378  
379 # Reduce logging to keep things readable in multiprocessing with tqdm

/usr/local/lib/python3.10/dist-packages/datasets/download/download\_manager.py in \_download\_batched(self, url\_or\_filenames, download\_config)  
311 )  
312 else:  
 → 313 return [  
314 self.\_download\_single(url\_or\_filename, download\_config=download\_config)  
315 for url\_or\_filename in url\_or\_filenames

/usr/local/lib/python3.10/dist-packages/datasets/download/download\_manager.py in (.0)  
312 else:  
313 return [  
 → 314 self.\_download\_single(url\_or\_filename, download\_config=download\_config)  
315 for url\_or\_filename in url\_or\_filenames  
316 ]

/usr/local/lib/python3.10/dist-packages/datasets/download/download\_manager.py in \_download\_single(self, url\_or\_filename, download\_config)  
321 # append the relative path to the base\_path  
322 url\_or\_filename = url\_or\_path\_join(self.\_base\_path, url\_or\_filename)  
 → 323 out = cached\_path(url\_or\_filename, download\_config=download\_config)  
324 out = tracked\_str(out)  
325 out.set\_origin(url\_or\_filename)

/usr/local/lib/python3.10/dist-packages/datasets/utils/file\_utils.py in cached\_path(url\_or\_filename, download\_config, \*\*download\_kwargs)  
199 if is\_remote\_url(url\_or\_filename):  
200 # URL, so get it from the cache (downloading if necessary)  
 → 201 output\_path = get\_from\_cache(  
202 url\_or\_filename,  
203 cache\_dir=cache\_dir,

/usr/local/lib/python3.10/dist-packages/datasets/utils/file\_utils.py in get\_from\_cache(url, cache\_dir, force\_download, proxies, etag\_timeout, resume\_download, user\_agent, local\_files\_only, use\_etag, max\_retries, token, use\_auth\_token, ignore\_url\_params, storage\_options, download\_desc, disable\_tqdm)  
674 ftp\_get(url, temp\_file)  
675 elif scheme not in (“http”, “https”):  
 → 676 fsspec\_get(  
677 url, temp\_file, storage\_options=storage\_options, desc=download\_desc, disable\_tqdm=disable\_tqdm  
678 )

/usr/local/lib/python3.10/dist-packages/datasets/utils/file\_utils.py in fsspec\_get(url, temp\_file, storage\_options, desc, disable\_tqdm)  
383 }  
384 )  
 → 385 fs.get\_file(path, temp\_file.name, callback=callback)  
386  
387

/usr/local/lib/python3.10/dist-packages/huggingface\_hub/hf\_file\_system.py in get\_file(self, rpath, lpath, callback, outfile, \*\*kwargs)  
632 callback.set\_size(expected\_size)  
633 try:  
 → 634 http\_get(  
635 url=hf\_hub\_url(  
636 repo\_id=resolve\_remote\_path.repo\_id,

TypeError: http\_get() got an unexpected keyword argument ‘displayed\_filename’

---

<div class="post-metadata">

**Author:** ![variniaq](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/variniaq/32/26185_2.png) [@variniaq](https://discuss.huggingface.co/u/variniaq)\
**Post date:** [April 24, 2024, 8:30pm UTC](https://discuss.huggingface.co/t/cannot-user-load-dataset-in-google-colab/83525/2 "2024-04-24T20:30:22Z")

</div>

Same here! Last days it was working ok, but now it just throw this error 😥

---

<div class="post-metadata">

**Author:** ![IssacPang](https://avatars.discourse-cdn.com/v4/letter/i/8491ac/32.png) [@IssacPang](https://discuss.huggingface.co/u/IssacPang)\
**Post date:** [April 24, 2024, 9:35pm UTC](https://discuss.huggingface.co/t/cannot-user-load-dataset-in-google-colab/83525/3 "2024-04-24T21:35:14Z")

</div>

the same here. What should I do?

---

<div class="post-metadata">

**Author:** ![severo](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/severo/32/27449_2.png) [@severo](https://discuss.huggingface.co/u/severo)\
**Post date:** [April 25, 2024, 8:43am UTC](https://discuss.huggingface.co/t/cannot-user-load-dataset-in-google-colab/83525/4 "2024-04-25T08:43:24Z")

</div>

cc @mariosasko @albertvillanova @lhoestq @polinaeterna

---

<div class="post-metadata">

**Author:** ![lhoestq](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/lhoestq/32/52888_2.png) [@lhoestq](https://discuss.huggingface.co/u/lhoestq)\
**Post date:** [April 25, 2024, 9:05am UTC](https://discuss.huggingface.co/t/cannot-user-load-dataset-in-google-colab/83525/5 "2024-04-25T09:05:28Z")

</div>

Sounds like an issue with `huggingface_hub`, can you try to udpate it ?

```auto
pip install -U huggingface_hub

```

---

<div class="post-metadata">

**Author:** ![albertvillanova](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/albertvillanova/32/26537_2.png) [@albertvillanova](https://discuss.huggingface.co/u/albertvillanova)\
**Post date:** [April 25, 2024, 10:23am UTC](https://discuss.huggingface.co/t/cannot-user-load-dataset-in-google-colab/83525/6 "2024-04-25T10:23:58Z")

</div>

Maybe you imported huggingface\_hub just before installing `datasets` and you are still using the old version:

```ipython
>>> huggingface_hub. __version__'0.20.3'

```

You could also try restarting your notebook kernel: Runtime \> Restart session

---

<div class="post-metadata">

**Author:** ![yicli-2lh](https://avatars.discourse-cdn.com/v4/letter/y/bb73d2/32.png) [@yicli-2lh](https://discuss.huggingface.co/u/yicli-2lh)\
**Post date:** [April 26, 2024, 5:53am UTC](https://discuss.huggingface.co/t/cannot-user-load-dataset-in-google-colab/83525/7 "2024-04-26T05:53:46Z")

</div>

@lhoestq Really thanks for your reply. I try it again and it works well now.
