GNOME Bugzilla – Bug 653187
[im-status] 'ascii' codec can't decode byte outside range(128)
Last modified: 2012-04-19 14:02:41 UTC
Seems to be something new in recent python versions: Traceback (most recent call last):
+ Trace 227560
self.set_entry (entry)
self.set_status_from_entry ()
self.set_status ()
new_status = _(u"♫ %(artist)s - %(title)s ♫") % subs
http://docs.python.org/howto/unicode.html
Created attachment 190470 [details] [review] [im-status] Do not assume 'ascii', or unicode() will fail
I'm far from being a python expert but this works for me.
Review of attachment 190470 [details] [review]: looks good to me
Attachment 190470 [details] pushed as f2a08e9 - [im-status] Do not assume 'ascii', or unicode() will fail
Claudio's patch unfortunately causes the plugin to crash when a database entry has empty artist, album or title tags, like radio station entries. The call to unicode(...) complains about being fed None as an argument. I'll attach a patch that performs a conversion of tags to unicode when they are extracted and stored in the current_xyz variables, making later conversions unnecessary. If a tag is empty, None is stored in its variable, as before. It also converts cached status messages to unicode on retrieval, which would otherwise cause the plugin to crash upon reading a status message with unicode characters.
Created attachment 212363 [details] [review] Perform unicode conversion on tag and status message retrieval with check for None Fixes a bug introduced by commit f2a08e99b8c0a75d092b5720e66288063820cbb9