Kaggle CLI has issues when working with datasets that have nested folders with spaces in the folder names.
One example is this dataset: viktoriiashkurenko/278k-spotify-songs
Enclosing the path in single or double quotes does not help. Also trying the escape the space or replace it with an HTML encoded space (%20) does not seem to work. This is on Windows command shell if that makes a difference:
kaggle datasets files "viktoriiashkurenko/278k-spotify-songs/Cleaned Analyses"
400 - Bad Request - Invalid datasetVersionNumber value
I closed this issue as I believe the title is misleading. The real issue is that currently one can not get a complete list of all files in the dataset including those in nested folders.
Kaggle CLI has issues when working with datasets that have nested folders with spaces in the folder names. One example is this dataset: viktoriiashkurenko/278k-spotify-songs
We can use the Kaggle CLI to get a list of files in the dataset:
However, this list omits the nested folder: "Cleaned Analyses"
It does not seem possible to list the files in that folder. Possibly this is due to the space in the name of the folder:
Enclosing the path in single or double quotes does not help. Also trying the escape the space or replace it with an HTML encoded space (%20) does not seem to work. This is on Windows command shell if that makes a difference:
We can extract one file from a dataset by specifying the "-f" option:
It seems we can put quotes around the full file path to extract individual files:
Perhaps I am just missing some obvious tricks or command-line options. Please let me know if you have any suggestions.
Thanks