libpytunes icon indicating copy to clipboard operation
libpytunes copied to clipboard

Issue with non english characters

Open bafonso opened this issue 6 years ago • 1 comments

Just got this using 2.7, conda environment w/ tensorflow. My library definitely has a lot of accents

---------------------------------------------------------------------------
UnicodeEncodeError                        Traceback (most recent call last)
<ipython-input-2-df9cbca52326> in <module>()
     19     if song and song.rating:
     20         if song.rating > 80:
---> 21             print("{n}, {r}".format(n=song.name, r=song.rating))

UnicodeEncodeError: 'ascii' codec can't encode character u'\xf1' in position 5: ordinal not in range(128)

I'm simply testing out the code for using pickle.

bafonso avatar May 22 '18 23:05 bafonso

how is song.name read from itunes xml? itunes has utf-8 encoding, is the file being parsed as utf-8?

bafonso avatar May 24 '18 04:05 bafonso