HANS dataset preview broken
{'login': 'pietrolesci', 'id': 61748653, 'node_id': 'MDQ6VXNlcjYxNzQ4NjUz', 'avatar_url': 'https://avatars.githubusercontent.com/u/61748653?v=4', 'gravatar_id': '', 'url': 'https://api.github.com/users/pietrolesci', 'html_url': 'https://github.com/pietrolesci', 'followers_url': 'https://api.github.com/users/pietrolesci/followers', 'following_url': 'https://api.github.com/users/pietrolesci/following{/other_user}', 'gists_url': 'https://api.github.com/users/pietrolesci/gists{/gist_id}', 'starred_url': 'https://api.github.com/users/pietrolesci/starred{/owner}{/repo}', 'subscriptions_url': 'https://api.github.com/users/pietrolesci/subscriptions', 'organizations_url': 'https://api.github.com/users/pietrolesci/orgs', 'repos_url': 'https://api.github.com/users/pietrolesci/repos', 'events_url': 'https://api.github.com/users/pietrolesci/events{/privacy}', 'received_events_url': 'https://api.github.com/users/pietrolesci/received_events', 'type': 'User', 'site_admin': False}
[{'id': 3287858981, 'node_id': 'MDU6TGFiZWwzMjg3ODU4OTgx', 'url': 'https://api.github.com/repos/huggingface/datasets/labels/streaming', 'name': 'streaming', 'color': 'fef2c0', 'default': False, 'description': ''}]
[]
['The dataset cannot be loaded, be it in normal or streaming mode.\r\n\r\n```python\r\n>>> import datasets\r\n>>> dataset=datasets.load_dataset("hans", split="train", streaming=True)\r\n>>> next(iter(dataset))\r\nTraceback (most recent call last):\r\n  File "<stdin>", line 1, in <module>\r\n  File "/home/slesage/hf/datasets-preview-backend/.venv/lib/python3.9/site-packages/datasets/iterable_dataset.py", line 497, in __iter__\r\n    for key, example in self._iter():\r\n  File "/home/slesage/hf/datasets-preview-backend/.venv/lib/python3.9/site-packages/datasets/iterable_dataset.py", line 494, in _iter\r\n    yield from ex_iterable\r\n  File "/home/slesage/hf/datasets-preview-backend/.venv/lib/python3.9/site-packages/datasets/iterable_dataset.py", line 87, in __iter__\r\n    yield from self.generate_examples_fn(**self.kwargs)\r\n  File "/home/slesage/.cache/huggingface/modules/datasets_modules/datasets/hans/1bbcb735c482acd54f2e118074b59cfd2bf5f7a5a285d4d540d1e632216672ac/hans.py", line 121, in _generate_examples\r\n    for idx, line in enumerate(open(filepath, "rb")):\r\n  File "/home/slesage/hf/datasets-preview-backend/.venv/lib/python3.9/site-packages/fsspec/spec.py", line 1595, in __next__\r\n    out = self.readline()\r\n  File "/home/slesage/hf/datasets-preview-backend/.venv/lib/python3.9/site-packages/fsspec/spec.py", line 1592, in readline\r\n    return self.readuntil(b"\\n")\r\n  File "/home/slesage/hf/datasets-preview-backend/.venv/lib/python3.9/site-packages/fsspec/spec.py", line 1581, in readuntil\r\n    self.seek(start + found + len(char))\r\n  File "/home/slesage/hf/datasets-preview-backend/.venv/lib/python3.9/site-packages/fsspec/implementations/http.py", line 676, in seek\r\n    raise ValueError("Cannot seek streaming HTTP file")\r\nValueError: Cannot seek streaming HTTP file\r\n>>> dataset=datasets.load_dataset("hans", split="train", streaming=False)\r\nDownloading and preparing dataset hans/plain_text (download: 29.51 MiB, generated: 30.34 MiB, post-processed: Unknown size, total: 59.85 MiB) to /home/slesage/.cache/huggingface/datasets/hans/plain_text/1.0.0/1bbcb735c482acd54f2e118074b59cfd2bf5f7a5a285d4d540d1e632216672ac...\r\nTraceback (most recent call last):\r\n  File "<stdin>", line 1, in <module>\r\n  File "/home/slesage/hf/datasets-preview-backend/.venv/lib/python3.9/site-packages/datasets/load.py", line 1687, in load_dataset\r\n    builder_instance.download_and_prepare(\r\n  File "/home/slesage/hf/datasets-preview-backend/.venv/lib/python3.9/site-packages/datasets/builder.py", line 605, in download_and_prepare\r\n    self._download_and_prepare(\r\n  File "/home/slesage/hf/datasets-preview-backend/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1104, in _download_and_prepare\r\n    super()._download_and_prepare(dl_manager, verify_infos, check_duplicate_keys=verify_infos)\r\n  File "/home/slesage/hf/datasets-preview-backend/.venv/lib/python3.9/site-packages/datasets/builder.py", line 694, in _download_and_prepare\r\n    self._prepare_split(split_generator, **prepare_split_kwargs)\r\n  File "/home/slesage/hf/datasets-preview-backend/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1087, in _prepare_split\r\n    for key, record in logging.tqdm(\r\n  File "/home/slesage/hf/datasets-preview-backend/.venv/lib/python3.9/site-packages/tqdm/std.py", line 1180, in __iter__\r\n    for obj in iterable:\r\n  File "/home/slesage/.cache/huggingface/modules/datasets_modules/datasets/hans/1bbcb735c482acd54f2e118074b59cfd2bf5f7a5a285d4d540d1e632216672ac/hans.py", line 121, in _generate_examples\r\n    for idx, line in enumerate(open(filepath, "rb")):\r\nValueError: readline of closed file\r\n```\r\n\r\n'
 'Hi! I\'ve opened a PR that should make this dataset stremable. You can test it as follows:\r\n```python\r\nfrom datasets import load_dataset\r\ndset = load_dataset("hans", split="train", streaming=True, revision="49decd29839c792ecc24ac88f861cbdec30c1c40")\r\n```\r\n\r\n@severo The current script doesn\'t throw an error in normal mode (only in streaming mode) on my local machine or in Colab. Can you update your installation of `datasets` and see if that fixes the issue?'
 "Thanks for this. It works well, thanks! The dataset viewer is using https://github.com/huggingface/datasets/releases/tag/2.0.0, I'm eager to upgrade to 2.0.1 😉"]
## Dataset viewer issue for '*hans*'

**Link:** [https://huggingface.co/datasets/hans](https://huggingface.co/datasets/hans)

HANS dataset preview is broken with error 400

Am I the one who added this dataset ? No

{'url': 'https://api.github.com/repos/huggingface/datasets/issues/4133/reactions', 'total_count': 0, '+1': 0, '-1': 0, 'laugh': 0, 'hooray': 0, 'confused': 0, 'heart': 0, 'rocket': 0, 'eyes': 0}