CaTzil/service.subtitles.napiprojekt

Android 4.4.2 Kodi Helix ERROR: EXCEPTION Thrown (PythonToCppException)

Closed this issue · 3 comments

Hi, sorry for my bad english and thanks for your work over subtitles addons for polish users.
I'm using your addons( napiprojekt and napisy24) and open subtitles, but most like usability off napiprojekt addon, i mean it is always get synchronized subtitles what is good for my purposes (trying to get full automatic subtiitles downloads).
I was using your addon before, and was working properly, but from some time was errors during downloading subtitles, now when i'm lucky i have some succes, i mean this problem escalating.
I have a kodi.log with this error, if it possible please help me out with this.

16:55:02 T:1918181504 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<-- - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS! Error Type: <type 'exceptions.AttributeError'> Error Contents: 'str' object has no attribute 'hexdigest' Traceback (most recent call last): File "/mnt/internal_sd/Android/data/org.xbmc.kodi/files/.kodi/addons/service.subtitles.napiprojekt/service.py", line 224, in Search(item) File "/mnt/internal_sd/Android/data/org.xbmc.kodi/files/.kodi/addons/service.subtitles.napiprojekt/service.py", line 94, in Search "f": d.hexdigest(), AttributeError: 'str' object has no attribute 'hexdigest' -->End of Python script error report<-- 16:55:33 T:1935789376 ERROR: static bool XFILE::CDirectory::GetDirectory(const CURL&, CFileItemList&, const XFILE::CDirectory::CHints&, bool) - Error getting plugin://service.subtitles.napiprojekt/?action=search&languages=Polish&preferredlanguage=Polish

The reason that napiprojekt returns accurate results is because it calculates Hash of the video file and sends it to the website to get the subtitle.

I experienced once that there is an issue with "slower devices" (calculating the Hash is heavy task).
If you can modify the code, can you please try to change the timeout in https://github.com/CaTzil/service.subtitles.napiprojekt/blob/master/service.py#L88
to something like 30...
If it will solve your problem i will update that in the Repo.

For more info:
#3

Thank you.

Still happening

Error Type: <type 'exceptions.AttributeError'>
Error Contents: 'str' object has no attribute 'hexdigest'
Traceback (most recent call last):
  File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/service.subtitles.napiprojekt/service.py", line 197, in <module>
    Search(item)
  File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/service.subtitles.napiprojekt/service.py", line 91, in Search
    md5hash = d.hexdigest()
AttributeError: 'str' object has no attribute 'hexdigest'

I have no experience but got the same error after add ons were loading on my fire stick. Is there a fix for this. I attached a photo of the error log.
log error log