Error listing dataset files
- Dominant language
- Python
- Stars
- 7.5k
- Forks
- 1.4k
- Avg merge
- 3d 15h
- Merged PRs (30d)
- 11
Description
[This dataset with only directories](https://www.kaggle.com/jonathanbesomi/rsna-miccai-png) in its root (there are files in the directories) returns an error when attempting to list the files:
```
> kaggle datasets files jonathanbesomi/rsna-miccai-png
max() arg is an empty sequence
```
The CSV display option does correctly handle no files. Though the dataset does indeed have files in it.
```
> kaggle datasets files jonathanbesomi/rsna-miccai-png --csv
name,size,creationDate
```
### Reproducing in Python
```python
from kaggle.api.kaggle_api_extended import KaggleApi
api = KaggleApi()
api.authenticate()
resp = api.process_response(api.datasets_list_files(
owner_slug="jonathanbesomi", dataset_slug="rsna-miccai-png"))
print(resp)
```
```
python ./test.py
{'datasetFiles': [], 'errorMessage': None}
```
### System info
```
> kaggle -v
Kaggle API 1.5.12
> python --version
Python 3.9.0
```
Contributor guide
Assessment
This issue has not been assessed yet.