mdeff / fma

FMA: A Dataset For Music Analysis
https://arxiv.org/abs/1612.01840
MIT License
2.24k stars 439 forks source link

`utils.load` crashing for `tracks.csv` #10

Closed DiegoAgher closed 6 years ago

DiegoAgher commented 6 years ago

I was trying to run the usage.ipynb and the second cell crashed with the following error:

KeyError: ('track', 'genres_top')

I took a look inside the code and the csv file. For utils.load in the case of tracks.csv, it appears that you only need to change the tuple ('track, 'genres_top') for ('track, 'genre_top')in the list. That is remove an 's'.

I did the previous but when running again the code now I get this error:


<ipython-input-2-aa99f4d2677d> in <module>()
      3 
      4 # Load metadata and features.
----> 5 tracks = utils.load('tracks.csv')

~/Desktop/Music_Project/fma/utils.py in load(filepath)
    203         for column in COLUMNS:
    204             print(column)
--> 205             tracks[column] = tracks[column].map(ast.literal_eval)
.
.
.
ValueError: malformed node or string: <_ast.Name object at 0x125eed2e8>```
mdeff commented 6 years ago

Please see #9. Thanks for reporting though, I will update the installation doc to clarify this.

DiegoAgher commented 6 years ago

👍 thank you!