0

I checked this answer but it doesn't work. Here's my code:

from mutagen.id3 import ID3
music = ID3('music.mp3')
music.get('APIC:').data

I get following error: 'NoneType' object has no attribute 'data'. I also tried to find out the field name using ID3('music.mp3'). There's no field name called APIC:, instead there's a field called APIC:thumbnail .

Sphinx
  • 394
  • 3
  • 17

1 Answers1

1

Ok i found the solution. remember to add [0] otherwise you'll get error saying that it has no attribute called data.

from mutagen.id3 import ID3
music = ID3('music.mp3')    
music.getall("APIC")[0].data
Sphinx
  • 394
  • 3
  • 17