2014-06-03, 11:08
(2014-05-12, 00:18)CrowleyAJ Wrote: Hi nard,
thanks for your report. I had a look at it, but unfortunately I'm not sure, what to do about it. The problem occurs inside a Python library, when cleaning up the temp directory before extracting new files and there seems to be an encoding problem in a filename. Maybe someone reads this, who is bit more proficient in Python and XBMC add-on development and can give me a hint, how to solve this problem.
The error message is this:
Code:Error Type: <type 'exceptions.UnicodeDecodeError'>
Error Contents: 'ascii' codec can't decode byte 0xc2 in position 22: ordinal not in range(128)
Traceback (most recent call last):
File "/storage/.xbmc/addons/service.subtitles.subscene/service.py", line 422, in <module>
subs = download(params["link"])
File "/storage/.xbmc/addons/service.subtitles.subscene/service.py", line 294, in download
shutil.rmtree(__temp__)
File "/home/stephan/projects/openelec-4.0/build.OpenELEC-Generic.x86_64-4.0.0/Python-2.7.3/.install_pkg/usr/lib/python2.7/shutil.py", line 239, in rmtree
File "/home/stephan/projects/openelec-4.0/build.OpenELEC-Generic.x86_64-4.0.0/Python-2.7.3/.install_pkg/usr/lib/python2.7/posixpath.py", line 71, in join
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 22: ordinal not in range(128)
And it occurs while just calling "shutil.rmtree(__temp__)". Has anyone an idea?
In latest OpenElec Release I'm having this kind of error. Usually is because of corrupt subtitle files in the temp folder of subtitle addon?
How that relates to change this:
__temp__ = xbmc.translatePath( os.path.join( __profile__, 'temp') ).decode("utf-8")
to
__temp__ = xbmc.translatePath( os.path.join( __profile__, 'temp') )
and start working all the times?