[XBMC Subtitles] Old encoding issue
#1
Hi, amet

I was having some troubles downloading subtitles from argenteam and subdivx services since a few weeks and I decided to take a look at the logs.

I found the following:

Code:
19:45:30 T:140112537040640   DEBUG: ### [XBMC Subtitles-services.Argenteam.service] - argenteam Saving subtitles to '/storage/.xbmc/userdata/addon_data/script.xbmc.subtitles/sub_tmp/argenteam.zip'
19:45:30 T:140112537040640   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.UnicodeDecodeError'>
                                            Error Contents: 'ascii' codec can't decode byte 0xa4 in position 38: ordinal not in range(128)
                                            Traceback (most recent call last):
                                              File "/storage/.xbmc/addons/script.xbmc.subtitles/resources/lib/gui.py", line 488, in onClick
                                                self.Download_Subtitles( self.getControl( SUBTITLES_LIST ).getSelectedPosition())
                                              File "/storage/.xbmc/addons/script.xbmc.subtitles/resources/lib/gui.py", line 297, in Download_Subtitles
                                                self.session_id
                                              File "/storage/.xbmc/addons/script.xbmc.subtitles/resources/lib/services/Argenteam/service.py", line 147, in download_subtitles
                                                mtime = os.stat(os.path.join(tmp_sub_dir, file)).st_mtime
                                              File "./Lib/posixpath.py", line 71, in join
                                            UnicodeDecodeError: 'ascii' codec can't decode byte 0xa4 in position 38: ordinal not in range(128)
                                            -->End of Python script error report<--

Searching on different forums and on the recently closed XBMC Subtitles post, I found that you posted this solution: https://github.com/amet/script.xbmc.subt...lib/gui.py

I applied that fix and subtitles started dowloading again.

The strange thing is that this fix is no longer on the code and I tracked when this fix was removed and I found this commit: https://github.com/amet/script.xbmc.subt...lib/gui.py where user deletes the fix because of some errors on windows.

So, the question is, should the fix be included again on gui.py?

Thanks for the hard work on the plugin.
Reply
#2
honestly, I have no idea... Smile

I cant reproduce it at all and I have no Windows machine to try... I'll see if I can catch jurrabi to have a quick look.. he is the master of encoding
Reply
#3
Is this still open?

Both modules are working fine for me now, but being spanish I can try to reproduce and fix if it is still an issue...

Sorry it take me so long to chip in... crazy life lately.
Always read the XBMC Online Manual,Frequently Asked Questions and search the forum before posting.
For troubleshooting and bug reporting use -> Log file.

Reply
#4
I can't honestly say if this still happening because I'm using the fix I posted above since then, but I think that you can reproduce this when a subtitle has special characters on the filename
Reply
#5
Right now I'm working on the new subtitles environment (as service not addon) so I don't have module for argenteam or subdivx.

I'll probably backtrack to old version by the weekend, when I'm finished documenting the how to upgrade, so I'll test then.

Thanks.
Always read the XBMC Online Manual,Frequently Asked Questions and search the forum before posting.
For troubleshooting and bug reporting use -> Log file.

Reply

Logout Mark Read Team Forum Stats Members Help
[XBMC Subtitles] Old encoding issue0