ValueError: Couldn't infer the same data file format for all splits. Got {'train': ('json', {}), 'validation': (None, {})}
NONE
How do you solve it ?

2024-06-18T11:56:12Z
https://github.com/huggingface/datasets/issues/6930#issuecomment-2175922607
https://api.github.com/repos/huggingface/datasets/issues/6930
IC_kwDODunzps6BsfGv
https://api.github.com/repos/huggingface/datasets/issues/comments/2175922607/reactions
2024-06-18T11:56:12Z
https://api.github.com/repos/huggingface/datasets/issues/comments/2175922607
https://avatars.githubusercontent.com/u/129817358?v=4
https://api.github.com/users/xioatian1/events{/privacy}
https://api.github.com/users/xioatian1/followers
https://api.github.com/users/xioatian1/following{/other_user}
https://api.github.com/users/xioatian1/gists{/gist_id}
https://github.com/xioatian1
xioatian1
U_kgDOB7zbDg
https://api.github.com/users/xioatian1/orgs
https://api.github.com/users/xioatian1/received_events
https://api.github.com/users/xioatian1/repos
https://api.github.com/users/xioatian1/starred{/owner}{/repo}
https://api.github.com/users/xioatian1/subscriptions
User
https://api.github.com/users/xioatian1
public
NONE
> How do you solve it ?

Please check your Python environment and dataset version. I have just resolved the issue, which was caused by a Python environment switching error

2024-07-23T06:25:23Z
https://github.com/huggingface/datasets/issues/6930#issuecomment-2244348768
https://api.github.com/repos/huggingface/datasets/issues/6930
IC_kwDODunzps6Fxgtg
https://api.github.com/repos/huggingface/datasets/issues/comments/2244348768/reactions
2024-07-23T06:25:23Z
https://api.github.com/repos/huggingface/datasets/issues/comments/2244348768
https://avatars.githubusercontent.com/u/15059874?v=4
https://api.github.com/users/zouhuigang/events{/privacy}
https://api.github.com/users/zouhuigang/followers
https://api.github.com/users/zouhuigang/following{/other_user}
https://api.github.com/users/zouhuigang/gists{/gist_id}
https://github.com/zouhuigang
zouhuigang
MDQ6VXNlcjE1MDU5ODc0
https://api.github.com/users/zouhuigang/orgs
https://api.github.com/users/zouhuigang/received_events
https://api.github.com/users/zouhuigang/repos
https://api.github.com/users/zouhuigang/starred{/owner}{/repo}
https://api.github.com/users/zouhuigang/subscriptions
User
https://api.github.com/users/zouhuigang
public
### Describe the bug

When I run the code en = load_dataset("allenai/c4", "en", streaming=True), I encounter an error: raise ValueError(f"Couldn't infer the same data file format for all splits. Got {split_modules}") ValueError: Couldn't infer the same data file format for all splits. Got {'train': ('json', {}), 'validation': (None, {})}.
However, running dataset = load_dataset('allenai/c4', streaming=True, data_files={'validation': 'en/c4-validation.00003-of-00008.json.gz'}, split='validation') works fine. What is the issue here?

### Steps to reproduce the bug

run code：
import os
os.environ['HF_ENDPOINT'] = 'https://hf-mirror.com'
from datasets import load_dataset

en = load_dataset("allenai/c4", "en", streaming=True)

### Expected behavior

Successfully loaded the dataset.

### Environment info

- `datasets` version: 2.18.0
- Platform: Linux-6.5.0-28-generic-x86_64-with-glibc2.17
- Python version: 3.8.19
- `huggingface_hub` version: 0.22.2
- PyArrow version: 15.0.2
- Pandas version: 2.0.3
- `fsspec` version: 2024.2.0
