• 1
  • 2
  • 3
  • 4(current)
  • 5
  • 6
  • 43
Release service.subtitles.subscene
#46
I pushed version 0.9.2 to github. If you use the ZIP download from github keep in mind that you might haver to remove the "-master" portion from the directory as mentioned by bass63.

@NCKYTUN: This version should fix your issue.

Since throwing a full scene release file name at subscene seems to give very mixed results, I try some heuristics first to determine if its a movie (i.e. it has a year in its filename) or a TV show (it has an episode code) before just doing a file name search.
Reply
#47
Thanks so much CrowleyAJ and amet!!! it works perfect.
Reply
#48
Glad to hear. I'll send it to the official repo then
Reply
#49
crowley sorry about the delay t report , it work perfect i using it as default , thanks
Reply
#50
Hello, since the last update I made I'm getting an Unicode/decode error in script when downloading a sub (wherever the sub file is) with subscene service. Logs are available in http://sprunge.us/fKRZ (last error is related to podnapisi but the previous one is subscene). Any hints ?
Reply
#51
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?
Reply
#52
Perhaps I could clean the temp manually if remains there a file with some encoding error in it.
Where is this temp dir ? is it the .xbmc/temp (in that case it's already empty) ?
Reply
#53
that would be .xbmc/userdata/addon_data/service.subtitles.subscene/temp/
Reply
#54
There was an srt file probably corrupted there, I removed it manually and now it works. Thanks for your help !
Reply
#55
When executing a subtitle search as soon as the video starts playing/loading on my raspberry, the addon causes an exception. Allowing the video to fully buffer and run a few seconds does not produce the exception. See below

Code:
18:28:09 T:2640110656   ERROR: EXCEPTION: XBMC is not playing any file
18:28:10 T:2640110656   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.RuntimeError'>
                                            Error Contents: XBMC is not playing any file
                                            Traceback (most recent call last):
                                              File "/home/pi/.xbmc/addons/service.subtitles.subscene/service.py", line 387, in <module>
                                                item['file_original_path'] = urllib.unquote(xbmc.Player().getPlayingFile().decode('utf-8'))  # Full path
                                            RuntimeError: XBMC is not playing any file
                                            -->End of Python script error report<--
18:28:10 T:2631722048   ERROR: GetDirectory - Error getting plugin://service.subtitles.subscene/?action=search&languages=English

I'm using raspbmc running v13 of xbmc on a raspberry pi
Reply
#56
(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?
Reply
#57
That sounds wrong. A lot of addons use
__temp__ = xbmc.translatePath( os.path.join( __profile__, 'temp') ).decode("utf-8")

so i see no reason why that doesn't work. That line is exactly the reason a lot of addon DO work.
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#58
(2014-06-03, 11:13)Martijn Wrote: That sounds wrong. A lot of addons use
__temp__ = xbmc.translatePath( os.path.join( __profile__, 'temp') ).decode("utf-8")

so i see no reason why that doesn't work. That line is exactly the reason a lot of addon DO work.

So is more probable that is because some corrupt file in the temp folder?

Isn't there a way of prior to download files to the temp folder the addon delete any file on the folder?
Reply
#59
I think I made a dumb question, because the problem is right with the code that tries to delete the temp folder with a corrupt file? And has to be treated manually?

So by the code:
__temp__ = xbmc.translatePath(pjoin(__profile__, 'temp')).decode("utf-8")

Is telling that variable __temp_ has the path to temp directory decoded to utf-8 and then:
Code:
"""Called when subtitle download request from XBMC."""
    # Cleanup temp dir, we recomend you download/unzip your subs in temp folder and
    # pass that to XBMC to copy and activate
    if xbmcvfs.exists(__temp__):
        shutil.rmtree(__temp__)
    xbmcvfs.mkdirs(__temp__)

The problem relies on shutil.rmtree(__temp__)
if folder is decoded I get the error, but if is not encoded I don't have, what relates with having a problem with a corrupt file?
To delete folder and every files shouldn't be the same?
Reply
#60
hi some day ago, i see problem with subscene, not working, always return not found.
My device is a iPad mini retina running iOS 7.0.4. Please help me. Thanks
Reply
  • 1
  • 2
  • 3
  • 4(current)
  • 5
  • 6
  • 43

Logout Mark Read Team Forum Stats Members Help
service.subtitles.subscene8