FileNotFound even though exists
COLLABORATOR
Hi! 

This would only work if `bigscience/xP3` was a no-code dataset, but it isn't (it has a Python builder script).

But this should work: 
```python
load_dataset("json", data_files="https://huggingface.co/datasets/bigscience/xP3/resolve/main/ur/xp3_facebook_flores_spa_Latn-urd_Arab_devtest_ab-spa_Latn-urd_Arab.jsonl")
```


2023-05-05T18:26:25Z
https://github.com/huggingface/datasets/issues/5825#issuecomment-1536620258
https://api.github.com/repos/huggingface/datasets/issues/5825
IC_kwDODunzps5blvbi
https://api.github.com/repos/huggingface/datasets/issues/comments/1536620258/reactions
2023-05-05T18:26:25Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1536620258
https://avatars.githubusercontent.com/u/47462742?v=4
https://api.github.com/users/mariosasko/events{/privacy}
https://api.github.com/users/mariosasko/followers
https://api.github.com/users/mariosasko/following{/other_user}
https://api.github.com/users/mariosasko/gists{/gist_id}
https://github.com/mariosasko
mariosasko
MDQ6VXNlcjQ3NDYyNzQy
https://api.github.com/users/mariosasko/orgs
https://api.github.com/users/mariosasko/received_events
https://api.github.com/users/mariosasko/repos
https://api.github.com/users/mariosasko/starred{/owner}{/repo}
https://api.github.com/users/mariosasko/subscriptions
User
https://api.github.com/users/mariosasko
public
CONTRIBUTOR
I see, it's not compatible w/ regex right?
e.g.
`load_dataset("json", data_files="https://huggingface.co/datasets/bigscience/xP3/resolve/main/ur/*")`
2023-05-05T20:06:52Z
https://github.com/huggingface/datasets/issues/5825#issuecomment-1536721077
https://api.github.com/repos/huggingface/datasets/issues/5825
IC_kwDODunzps5bmIC1
https://api.github.com/repos/huggingface/datasets/issues/comments/1536721077/reactions
2023-05-05T20:06:52Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1536721077
https://avatars.githubusercontent.com/u/62820084?v=4
https://api.github.com/users/Muennighoff/events{/privacy}
https://api.github.com/users/Muennighoff/followers
https://api.github.com/users/Muennighoff/following{/other_user}
https://api.github.com/users/Muennighoff/gists{/gist_id}
https://github.com/Muennighoff
Muennighoff
MDQ6VXNlcjYyODIwMDg0
https://api.github.com/users/Muennighoff/orgs
https://api.github.com/users/Muennighoff/received_events
https://api.github.com/users/Muennighoff/repos
https://api.github.com/users/Muennighoff/starred{/owner}{/repo}
https://api.github.com/users/Muennighoff/subscriptions
User
https://api.github.com/users/Muennighoff
public
COLLABORATOR
> I see, it's not compatible w/ regex right? e.g. `load_dataset("json", data_files="https://huggingface.co/datasets/bigscience/xP3/resolve/main/ur/*")`

It should work for patterns that "reference" the local filesystem, but to make this work with the Hub, we must implement https://github.com/huggingface/datasets/issues/5281 first.

In the meantime, you can fetch these glob files with `HfFileSystem` and pass them as a list to `load_dataset`:
```python
from datasets import load_dataset
from huggingface_hub import HfFileSystem, hf_hub_url # `HfFileSystem` requires the latest version of `huggingface_hub`

fs = HfFileSystem()
glob_files = fs.glob("datasets/bigscience/xP3/ur/*")
# convert fsspec URLs to HTTP URLs
resolved_paths = [fs.resolve_path(file) for file in glob_files]
data_files = [hf_hub_url(resolved_path.repo_id, resolved_path.path_in_repo, repo_type=resolved_path.repo_type) for resolved_path in resolved_paths]

ds = load_dataset("json", data_files=data_files)
```
2023-05-07T17:43:16Z
https://github.com/huggingface/datasets/issues/5825#issuecomment-1537502132
https://api.github.com/repos/huggingface/datasets/issues/5825
IC_kwDODunzps5bpGu0
https://api.github.com/repos/huggingface/datasets/issues/comments/1537502132/reactions
2023-05-07T17:43:46Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1537502132
https://avatars.githubusercontent.com/u/47462742?v=4
https://api.github.com/users/mariosasko/events{/privacy}
https://api.github.com/users/mariosasko/followers
https://api.github.com/users/mariosasko/following{/other_user}
https://api.github.com/users/mariosasko/gists{/gist_id}
https://github.com/mariosasko
mariosasko
MDQ6VXNlcjQ3NDYyNzQy
https://api.github.com/users/mariosasko/orgs
https://api.github.com/users/mariosasko/received_events
https://api.github.com/users/mariosasko/repos
https://api.github.com/users/mariosasko/starred{/owner}{/repo}
https://api.github.com/users/mariosasko/subscriptions
User
https://api.github.com/users/mariosasko
public
MEMBER
This works using `load_dataset("json", data_files="hf://datasets/bigscience/xP3/ur/*")` now, closing
2023-08-16T10:02:01Z
https://github.com/huggingface/datasets/issues/5825#issuecomment-1680318818
https://api.github.com/repos/huggingface/datasets/issues/5825
IC_kwDODunzps5kJ6Fi
https://api.github.com/repos/huggingface/datasets/issues/comments/1680318818/reactions
2023-08-16T10:02:01Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1680318818
https://avatars.githubusercontent.com/u/42851186?v=4
https://api.github.com/users/lhoestq/events{/privacy}
https://api.github.com/users/lhoestq/followers
https://api.github.com/users/lhoestq/following{/other_user}
https://api.github.com/users/lhoestq/gists{/gist_id}
https://github.com/lhoestq
lhoestq
MDQ6VXNlcjQyODUxMTg2
https://api.github.com/users/lhoestq/orgs
https://api.github.com/users/lhoestq/received_events
https://api.github.com/users/lhoestq/repos
https://api.github.com/users/lhoestq/starred{/owner}{/repo}
https://api.github.com/users/lhoestq/subscriptions
User
https://api.github.com/users/lhoestq
public
### Describe the bug

I'm trying to download https://huggingface.co/datasets/bigscience/xP3/resolve/main/ur/xp3_facebook_flores_spa_Latn-urd_Arab_devtest_ab-spa_Latn-urd_Arab.jsonl which works fine in my webbrowser, but somehow not with datasets. Am I doing sth wrong?

```
Downloading builder script: 100%
2.82k/2.82k [00:00<00:00, 64.2kB/s]
Downloading readme: 100%
12.6k/12.6k [00:00<00:00, 585kB/s]
---------------------------------------------------------------------------
FileNotFoundError                         Traceback (most recent call last)
[<ipython-input-2-4b45446a91d5>](https://localhost:8080/#) in <cell line: 4>()
      2 lang = "ur"
      3 fname = "xp3_facebook_flores_spa_Latn-urd_Arab_devtest_ab-spa_Latn-urd_Arab.jsonl"
----> 4 dataset = load_dataset("bigscience/xP3", data_files=f"{lang}/{fname}")

6 frames
[/usr/local/lib/python3.10/dist-packages/datasets/data_files.py](https://localhost:8080/#) in _resolve_single_pattern_locally(base_path, pattern, allowed_extensions)
    291         if allowed_extensions is not None:
    292             error_msg += f" with any supported extension {list(allowed_extensions)}"
--> 293         raise FileNotFoundError(error_msg)
    294     return sorted(out)
    295 

FileNotFoundError: Unable to find 'https://huggingface.co/datasets/bigscience/xP3/resolve/main/ur/xp3_facebook_flores_spa_Latn-urd_Arab_devtest_ab-spa_Latn-urd_Arab.jsonl' at /content/https:/huggingface.co/datasets/bigscience/xP3/resolve/main
```

### Steps to reproduce the bug

```
!pip install -q datasets
from datasets import load_dataset
lang = "ur"
fname = "xp3_facebook_flores_spa_Latn-urd_Arab_devtest_ab-spa_Latn-urd_Arab.jsonl"
dataset = load_dataset("bigscience/xP3", data_files=f"{lang}/{fname}")
```

### Expected behavior

Correctly downloads

### Environment info

latest versions