In my file, I have

from mutagen.id3 import ID3
tags = ID3(mp3_file)

Now if I do print(tags.keys())

It informs me that there's a TXXX:FMPS_Rating_Amarok_Score

But when I attempt to print(tags["TXXX:FMPS_Rating_Amarok_Score"])

It says there's a KeyError. What am I doing wrong?

you are viewing a single comment's thread
view the rest of the comments
[–] 6 points 2 years ago (1 child)

Dict keys are case sensitive in python. In your code I can see the key you've used has a capital M in Amarok. Maybe that's the issue here

  • source
  • parent
  • hideshow 2 child comments