service.autosubs icon indicating copy to clipboard operation
service.autosubs copied to clipboard

Kodi 20 and autosubs - kodi crash

Open Wolvverine opened this issue 2 years ago • 9 comments

`2023-01-24 11:10:38.916 T:1118 info : AddOnLog: pvr.iptvsimple: pvr.iptvsimple - LoadChannelEpgs - Loaded '823' EPG channels. 2023-01-24 11:10:48.264 T:1118 info : AddOnLog: pvr.iptvsimple: pvr.iptvsimple - LoadEpgEntries - Loaded '82388' EPG entries. 2023-01-24 11:10:49.359 T:1118 info : AddOnLog: pvr.iptvsimple: pvr.iptvsimple - LoadEPG - EPG Loaded - 17091 (ms) 2023-01-24 11:10:49.406 T:1118 info : AddOnLog: pvr.iptvsimple: Create Starting separate client update thread... 2023-01-24 11:10:49.407 T:1118 info : PVR Manager: Starting 2023-01-24 11:10:55.161 T:1146 error : EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<-- - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS! Error Type: <class 'AttributeError'> Error Contents: module 'xbmc' has no attribute 'translatePath' Traceback (most recent call last): File "/home/astr/.kodi/addons/service.autosubs/default.py", line 3, in from resources.lib.autosubs import * File "/home/astr/.kodi/addons/service.autosubs/resources/lib/autosubs.py", line 14, in cwd = xbmc.translatePath(addon.getAddonInfo('path')) AttributeError: module 'xbmc' has no attribute 'translatePath' -->End of Python script error report<--

2023-01-24 11:11:01.204 T:1144 info : ### Unpause Jumpback 3.0.3 - Starting... 2023-01-24 11:11:01.204 T:1144 info : ### Unpause Jumpback 3.0.3 - Kodi Version: 20.0 (20.0.0) Git:20230115-389e701cb9 2023-01-24 11:11:01.204 T:1144 info : ### Unpause Jumpback 3.0.3 - Addon arguments: [''] 2023-01-24 11:11:01.366 T:1165 info : PVR Manager: Started `

Wolvverine avatar Jan 24 '23 10:01 Wolvverine

i have the same problem due to the attribute error, but i don't know how to fix it.

chris2677 avatar Jan 28 '23 15:01 chris2677

A temporary method to start kodi is to delete the plugin directory, in my case:

/home/astr/.kodi/addons/service.autosubs

Wolvverine avatar Feb 01 '23 13:02 Wolvverine

@Wolvverine @chris2677 I have published #51 that should fix this issue. The problem is that I don't really know if this repository is in active maintenance. You can try fixing the issue by yourself - by doing these steps:

  1. Open file /home/astr/.kodi/addons/service.autosubs/resources/lib/autosubs.py in notepad (I am on Windows, for Linux use nano or vi)
  2. Change following code in the beginning of the file:

#!/usr/bin/python

import os import xbmc import xbmcaddon

Add line import xbmcvfs as new line after import xbmc - the beginning of your file should look like this:

#!/usr/bin/python

import os import xbmc import xbmcvfs import xbmcaddon

  1. Replace the text xbmc.translatePath with xbmcvfs.translatePath - example: line that looks like this __cwd__ = xbmc.translatePath(__addon__.getAddonInfo('path')) should be now __cwd__ = xbmcvfs.translatePath(__addon__.getAddonInfo('path'))

This should fix the error.

ghostxwheel avatar Feb 07 '23 17:02 ghostxwheel

It worked perfectly. I had to change all 3 paths so it looks like this. cwd = xbmcvfs.translatePath(addon.getAddonInfo('path')) profile = xbmcvfs.translatePath(addon.getAddonInfo('profile')) resource = xbmcvfs.translatePath(os.path.join(cwd, 'resources'))

Thanks for your help it's working perfectly now

T

On Tue, Feb 7, 2023 at 9:48 AM ghostxwheel @.***> wrote:

@Wolvverine https://github.com/Wolvverine @chris2677 https://github.com/chris2677 I have published #51 https://github.com/amet/service.autosubs/pull/51 that should fix this issue. The problem is that I don't really know if this repository is in active maintenance. You can try fixing the issue by yourself - by doing these steps:

  1. Open file /home/astr/.kodi/addons/service.autosubs/resources/lib/autosubs.py in notepad (I am on Windows, for Linux use nano or vi)
  2. Change following code in the beginning of the file:

#!/usr/bin/python

import os import xbmc import xbmcaddon

Add line import xbmcvfs as new line after import xbmc - the beginning of your file should look like this:

#!/usr/bin/python

import os import xbmc import xbmcvfs import xbmcaddon

  1. Replace the text xbmc.translatePath with xbmcvfs.translatePath - example: line that looks like this cwd = xbmc.translatePath(addon.getAddonInfo('path')) should be now cwd = xbmcvfs.translatePath(addon.getAddonInfo('path'))

This should fix the error.

— Reply to this email directly, view it on GitHub https://github.com/amet/service.autosubs/issues/50#issuecomment-1421199265, or unsubscribe https://github.com/notifications/unsubscribe-auth/APDORD4TVDJLROFJ34JB2PTWWKDITANCNFSM6AAAAAAUE5IQBI . You are receiving this because you were mentioned.Message ID: @.***>

chris2677 avatar Feb 09 '23 15:02 chris2677

@ghostxwheel @chris2677 Maybe ask the repo owner if he will update the projects?

Wolvverine avatar Feb 09 '23 19:02 Wolvverine

I have pulled in the changes, if someone can submit it to Kodi for review @schumi2004 ?

amet avatar Feb 15 '23 13:02 amet

Sorry for my late response. Let me test and submit it.

schumi2004 avatar Mar 07 '23 13:03 schumi2004

I actually just uninstalled the plugin for the same error and reinstalled today (4/22/2023). The official kodi repo has the plugin at version 1.1.1 as of today. I made these changes and it got rid of this error.

However, my system was still crashing, specifically when I would navigate in my skin to the MOVIES category AND have the "watched" movies flag turned on, it would crash nearly immediately. (If I had the view set to unwatched it did not crash). I could move the "watched" movies so they weren't in the path; it wouldn't crash. Thus, I had to "find" the offending movie(s) that once worked, and no longer did. The reason why I am mentioning it here is because I found said movie, and when I removed the subs that were in that folder, the crashing stopped.

Sadly I deleted those subs completely so I cant submit them for review. With debug logging on, and component logging on, the error above was one of them and with the offending sub file removed, everything is ok again.

noybman avatar Apr 22 '23 20:04 noybman

I have same error when I install autosubs on android tv

davordragic avatar Feb 13 '24 17:02 davordragic