I’m trying to write a Python script that reads the filename of my MP3s and when it finds a missing Artist tag it will take it from the first part of the filename. Most of my MP3s are titled “Artist – Title.mp3”.
But none of the ID3 tag readers work very well in Python. ID3 won’t read any tag past 1.1 and it hasn’t been developed since 2002. Mutagen raises exceptions when a file is missing tags. Eye3D requires installing a binary to get the libraries to work, ditto with pylibid3.
Am I using the wrong language? I’ve heard that Perl has some great ID3 tag libraries. I’m a novice so switching languages (it’s been a while since I’ve read a book on Perl) would mean starting over from scratch. But I’m willing to do it if Python is the wrong language.
Any thoughts?
It’s easy enough to handle the exception with mutagen: