NoneType to unicode
John Morey
john.morey at gmail.com
Mon Dec 12 11:38:43 EST 2005
My program reads ID3 tags from MP3 files and enters them into a database.
I have been testing it on a variety of MP3s, including ones with
weird characters in the tags (such as norweigan black metal bands)
When this happens it throws the program as they are outside the ascii
range, the program crashes as soon as I try to bind the tag to a string
using the str() function.
I have tried using the encode() function to change the values to unicode
however I cannot do this because they are returned from the id3
library as "NoneType" instances. which means I need to convert
to a string first (which i can't do because it crashes the application)
Any ideas?
cheers
More information about the Python-list
mailing list