[Tutor] MP3Info class usage

Gareth at Serif gmorris at serif.com
Wed Dec 10 13:48:38 CET 2008


Has anyone ever used MP3Info to retrieve the ID3 tags from an MP3?  It seems
to be a well written class that can access ID3 tags in v.1 or v.2, but I've
not used classes before and I'm struggling to figure out how to use it.

Given that, for testing purposses, I have a property called 'testfile' set
to the path of a valid MP3 file, I then try to output the artist name with
the following, where ID3v2 is a class defined in MP3Info:
song = ID3v2(testfile)
print '\nArtist is: %s' % (song.artist)

When I execute this script I get an error, "AttributeError: 'str' object has
no attribute 'seek'".  Is this a bug in the class or am I not using it
correctly?  Has anyone any better suggestions for retreiving ID3 tags from
an MP3 file using python?

Regards,
Gareth
-- 
View this message in context: http://www.nabble.com/MP3Info-class-usage-tp20934673p20934673.html
Sent from the Python - tutor mailing list archive at Nabble.com.



More information about the Tutor mailing list