2012-08-21, 20:57
(2012-08-21, 19:40)pkscuot Wrote:(2012-08-20, 17:52)dreamkp Wrote: thanks for getting on that so fast.
the new branch script throws an error when playing an artist with special chars and it still doesn't save anything.
OK, let's try this again. This code works properly on my OSX and Windows machines with Björk as an artist. I'm hoping this also fixes the Windows username issue, as it turns out one of the problems relates to the fact that you can't write to the XBMC log in UTF-8. So I had to make sure to re-encode any text string before writing it out.
Here's the updated test code for the non-ascii character issue. If we can get this one resolved, I'll merge it into master and do another pull request into the repo (which will also include the notification fixes then).
Hi pkscout,
it's getting better. Now artistbio.nfo, artistsalbums.nfo and artistsimilar.nfo are written. Then i get a script error and the log below.
Seems only artistimageshtbackdrops.nfo, artistimageslastfm.nfo and the *.tbn are missing now. We're close
-------------------------
20:52:44 T:2672 ERROR: Error Type: <type 'exceptions.UnicodeDecodeError'>
20:52:44 T:2672 ERROR: Error Contents: 'ascii' codec can't decode byte 0xc3 in position 146: ordinal not in range(128)
20:52:44 T:2672 ERROR: Traceback (most recent call last):
File "C:\xbmc_frodo\portable_data\addons\script.artistslideshow\default.py", line 742, in <module>
slideshow = Main()
File "C:\xbmc_frodo\portable_data\addons\script.artistslideshow\default.py", line 134, in __init__
self._use_correct_artwork()
File "C:\xbmc_frodo\portable_data\addons\script.artistslideshow\default.py", line 182, in _use_correct_artwork
self._start_download()
File "C:\xbmc_frodo\portable_data\addons\script.artistslideshow\default.py", line 351, in _start_download
lastfmlist = self._get_images('lastfm')
File "C:\xbmc_frodo\portable_data\addons\script.artistslideshow\default.py", line 562, in _get_images
log( 'asking for images from: %s' %self.url )
File "C:\xbmc_frodo\portable_data\addons\script.artistslideshow\default.py", line 77, in log
message = 'script.artistslideshow: %s' % txt.encode("utf-8")
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 146: ordinal not in range(128)
-------------------------
Regards,
Maikl