datasets.load_dataset("code_search_net", "python") : NotADirectoryError: [Errno 20] Not a directory
NONE
Note:
I listed the datasets and grepped around to find what appears to be an alternative source for this:

raw_datasets = load_dataset("espejelomar/code_search_net_python_10000_examples", "python")
2023-04-21T02:27:08Z
https://github.com/huggingface/datasets/issues/5777#issuecomment-1517168757
https://api.github.com/repos/huggingface/datasets/issues/5777
IC_kwDODunzps5abih1
https://api.github.com/repos/huggingface/datasets/issues/comments/1517168757/reactions
2023-04-21T02:27:08Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1517168757
https://avatars.githubusercontent.com/u/10137?v=4
https://api.github.com/users/ghost/events{/privacy}
https://api.github.com/users/ghost/followers
https://api.github.com/users/ghost/following{/other_user}
https://api.github.com/users/ghost/gists{/gist_id}
https://github.com/ghost
ghost
MDQ6VXNlcjEwMTM3
https://api.github.com/users/ghost/orgs
https://api.github.com/users/ghost/received_events
https://api.github.com/users/ghost/repos
https://api.github.com/users/ghost/starred{/owner}{/repo}
https://api.github.com/users/ghost/subscriptions
User
https://api.github.com/users/ghost
public
MEMBER
Thanks for reporting, @jason-brian-anderson.

Yes, this is a known issue: the [CodeSearchNet](https://github.com/github/CodeSearchNet) repo has been archived (Apr 11, 2023) and their source data files are no longer accessible in their S3: e.g. https://s3.amazonaws.com/code-search-net/CodeSearchNet/v2/python.zip gives 403 Forbidden error. See:
- https://huggingface.co/datasets/code_search_net/discussions/3

We have contacted one of the authors of the dataset to find a solution. I'll keep you informed.

CC: @hamelsmu
2023-04-21T07:48:44Z
https://github.com/huggingface/datasets/issues/5777#issuecomment-1517417592
https://api.github.com/repos/huggingface/datasets/issues/5777
IC_kwDODunzps5acfR4
https://api.github.com/repos/huggingface/datasets/issues/comments/1517417592/reactions
2023-04-21T07:59:24Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1517417592
https://avatars.githubusercontent.com/u/8515462?v=4
https://api.github.com/users/albertvillanova/events{/privacy}
https://api.github.com/users/albertvillanova/followers
https://api.github.com/users/albertvillanova/following{/other_user}
https://api.github.com/users/albertvillanova/gists{/gist_id}
https://github.com/albertvillanova
albertvillanova
MDQ6VXNlcjg1MTU0NjI=
https://api.github.com/users/albertvillanova/orgs
https://api.github.com/users/albertvillanova/received_events
https://api.github.com/users/albertvillanova/repos
https://api.github.com/users/albertvillanova/starred{/owner}{/repo}
https://api.github.com/users/albertvillanova/subscriptions
User
https://api.github.com/users/albertvillanova
public
NONE
cc: @julianeagu
2023-04-21T11:40:22Z
https://github.com/huggingface/datasets/issues/5777#issuecomment-1517695173
https://api.github.com/repos/huggingface/datasets/issues/5777
IC_kwDODunzps5adjDF
https://api.github.com/repos/huggingface/datasets/issues/comments/1517695173/reactions
2023-04-21T11:40:22Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1517695173
https://avatars.githubusercontent.com/u/1483922?v=4
https://api.github.com/users/hamelsmu/events{/privacy}
https://api.github.com/users/hamelsmu/followers
https://api.github.com/users/hamelsmu/following{/other_user}
https://api.github.com/users/hamelsmu/gists{/gist_id}
https://github.com/hamelsmu
hamelsmu
MDQ6VXNlcjE0ODM5MjI=
https://api.github.com/users/hamelsmu/orgs
https://api.github.com/users/hamelsmu/received_events
https://api.github.com/users/hamelsmu/repos
https://api.github.com/users/hamelsmu/starred{/owner}{/repo}
https://api.github.com/users/hamelsmu/subscriptions
User
https://api.github.com/users/hamelsmu
public
MEMBER
This issue is fixed because we are hosting the CodeSearchNet data files in the Hugging Face Hub. See: https://huggingface.co/datasets/code_search_net/discussions/7
2023-05-11T11:51:56Z
https://github.com/huggingface/datasets/issues/5777#issuecomment-1543855349
https://api.github.com/repos/huggingface/datasets/issues/5777
IC_kwDODunzps5cBVz1
https://api.github.com/repos/huggingface/datasets/issues/comments/1543855349/reactions
2023-05-11T11:51:56Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1543855349
https://avatars.githubusercontent.com/u/8515462?v=4
https://api.github.com/users/albertvillanova/events{/privacy}
https://api.github.com/users/albertvillanova/followers
https://api.github.com/users/albertvillanova/following{/other_user}
https://api.github.com/users/albertvillanova/gists{/gist_id}
https://github.com/albertvillanova
albertvillanova
MDQ6VXNlcjg1MTU0NjI=
https://api.github.com/users/albertvillanova/orgs
https://api.github.com/users/albertvillanova/received_events
https://api.github.com/users/albertvillanova/repos
https://api.github.com/users/albertvillanova/starred{/owner}{/repo}
https://api.github.com/users/albertvillanova/subscriptions
User
https://api.github.com/users/albertvillanova
public
NONE
I learned that @mallamanis has uploaded the dataset [here as well](https://zenodo.org/record/7908468) 
2023-06-04T19:14:06Z
https://github.com/huggingface/datasets/issues/5777#issuecomment-1575678915
https://api.github.com/repos/huggingface/datasets/issues/5777
IC_kwDODunzps5d6vPD
https://api.github.com/repos/huggingface/datasets/issues/comments/1575678915/reactions
2023-06-04T19:14:06Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1575678915
https://avatars.githubusercontent.com/u/1483922?v=4
https://api.github.com/users/hamelsmu/events{/privacy}
https://api.github.com/users/hamelsmu/followers
https://api.github.com/users/hamelsmu/following{/other_user}
https://api.github.com/users/hamelsmu/gists{/gist_id}
https://github.com/hamelsmu
hamelsmu
MDQ6VXNlcjE0ODM5MjI=
https://api.github.com/users/hamelsmu/orgs
https://api.github.com/users/hamelsmu/received_events
https://api.github.com/users/hamelsmu/repos
https://api.github.com/users/hamelsmu/starred{/owner}{/repo}
https://api.github.com/users/hamelsmu/subscriptions
User
https://api.github.com/users/hamelsmu
public
MEMBER
Thanks @hamelsmu for the Zenodo link. I am adding it to the dataset card on the Hugging Face Hub, so that the community knows about this "official" source data. I guess this link is not well known, because some community members already hosted an "unofficial" version of the data on Zenodo as well: https://zenodo.org/record/7857872


2023-06-05T05:49:52Z
https://github.com/huggingface/datasets/issues/5777#issuecomment-1576083293
https://api.github.com/repos/huggingface/datasets/issues/5777
IC_kwDODunzps5d8R9d
https://api.github.com/repos/huggingface/datasets/issues/comments/1576083293/reactions
2023-06-05T05:49:52Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1576083293
https://avatars.githubusercontent.com/u/8515462?v=4
https://api.github.com/users/albertvillanova/events{/privacy}
https://api.github.com/users/albertvillanova/followers
https://api.github.com/users/albertvillanova/following{/other_user}
https://api.github.com/users/albertvillanova/gists{/gist_id}
https://github.com/albertvillanova
albertvillanova
MDQ6VXNlcjg1MTU0NjI=
https://api.github.com/users/albertvillanova/orgs
https://api.github.com/users/albertvillanova/received_events
https://api.github.com/users/albertvillanova/repos
https://api.github.com/users/albertvillanova/starred{/owner}{/repo}
https://api.github.com/users/albertvillanova/subscriptions
User
https://api.github.com/users/albertvillanova
public
### Describe the bug

While checking out the [tokenizer tutorial](https://huggingface.co/course/chapter6/2?fw=pt), i noticed getting an error while initially downloading the python dataset used in the examples.

The [collab with the error is here](https://colab.research.google.com/github/huggingface/notebooks/blob/master/course/en/chapter6/section2.ipynb#scrollTo=hGb69Yo3eV8S)

```
from datasets import load_dataset
import os

os.environ["HF_DATASETS_CACHE"] = "/workspace"

# This can take a few minutes to load, so grab a coffee or tea while you wait!
raw_datasets = load_dataset("code_search_net", "python")
```

yeilds:

```
ile /opt/conda/lib/python3.10/site-packages/datasets/download/streaming_download_manager.py:524, in xlistdir(path, use_auth_token)
    522 main_hop, *rest_hops = _as_str(path).split("::")
    523 if is_local_path(main_hop):
--> 524     return os.listdir(path)
    525 else:
    526     # globbing inside a zip in a private repo requires authentication
    527     if not rest_hops and (main_hop.startswith("http://") or main_hop.startswith("https://")):

NotADirectoryError: [Errno 20] Not a directory: '/workspace/downloads/25ceeb4c25ab737d688bd56ea92bfbb1f199fe572470456cf2d675479f342ac7/python/final/jsonl/train'
```

I was able to reproduce this erro both in the collab and on my own pytorch/pytorch container pulled from the dockerhub official pytorch image, so i think it may be a server side thing. 

### Steps to reproduce the bug

Steps to reproduce the issue:

1. run `raw_datasets = load_dataset("code_search_net", "python")`

### Expected behavior

expect the code to not exception during dataset pull.

### Environment info

i tried both the default HF_DATASETS_CACHE on Collab, and on my local container.  i then pointed to the HF_DATASETS_CACHE to a  large capacity local storage and the problem was consisten across all 3 scenarios.