2012-09-19, 17:59
Thank you for great script, this script helps to speed up the add-on development and I really like it and use it in all my xbmc add-ons.
But since today all my plugins are broken and I get the following error:
I investigated the issue and found out, that the default encoding is set to 'utf-8' in version 1.2.0, but it causes crash for non utf-8 pages ( Fetchpage should decode binary to utf-8 ).
Is it possible to provide some configuration option like: common.encoding = 'cp1251'?
Many thanks in advance for your help and I hope this will be fix in the next add-on version.
But since today all my plugins are broken and I get the following error:
Code:
response = common.fetchPage({"link": url})
File ".../Library/Application Support/XBMC/addons/script.module.parsedom/lib/CommonFunctions.py", line 410, in fetchPage
ret_obj["content"] = inputdata.decode("utf-8")
File "/Applications/XBMC.app/Contents/Frameworks/lib/python2.6/encodings/utf_8.py", line 16, in decode
return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode bytes in position 275-276: invalid data
I investigated the issue and found out, that the default encoding is set to 'utf-8' in version 1.2.0, but it causes crash for non utf-8 pages ( Fetchpage should decode binary to utf-8 ).
Is it possible to provide some configuration option like: common.encoding = 'cp1251'?
Many thanks in advance for your help and I hope this will be fix in the next add-on version.