2013-07-22, 14:57
I had this error (script version v2.1.5):
I added .encode('utf-8') to the line 55 to make it stop throwing the error:
Quote:10:24:44 T:139752967747328 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<-
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.UnicodeEncodeError'>
Error Contents: 'ascii' codec can't encode character u'\u010d' in position 6: ordinal not in range(128)
Traceback (most recent call last):
File "/home/htpc/.xbmc/addons/script.randomandlastitems/randomandlastitems.py", line 744, in <module>
_parse_argv()
File "/home/htpc/.xbmc/addons/script.randomandlastitems/randomandlastitems.py", line 665, in _parse_argv
_getPlaylistType ();
File "/home/htpc/.xbmc/addons/script.randomandlastitems/randomandlastitems.py", line 57, in _getPlaylistType
_setProperty( "%s.Name" % PROPERTY, str( _name ) )
UnicodeEncodeError: 'ascii' codec can't encode character u'\u010d' in position 6: ordinal not in range(128)
-->End of Python script error report<--
I added .encode('utf-8') to the line 55 to make it stop throwing the error:
Code:
_name = _doc.getElementsByTagName('name')[0].firstChild.nodeValue.encode('utf-8')