realcopacetic / script.copacetic.helper

Helper addon for skin.copacetic
Other
2 stars 0 forks source link

IndexError: list index out of range #5

Closed DecentM closed 5 months ago

DecentM commented 7 months ago

Occasionally I see a notification about the Copacetic helper producing an error. After digging into the logs, I found this trace:

It seems to happen often when playing media (I use the Jellyfin plugin, so no mounted media), and every time I use Tubecast to cast Youtube videos. I use version 1.0.1 of the helper, which Kodi says is the latest at the time. I'm guessing based on the stack that if the currently playing file has no metadata, then this happens, but its just speculation.

2024-02-09 04:10:54.344 T:390     error <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                                    - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                                   Error Type: <class 'IndexError'>
                                                   Error Contents: list index out of range
                                                   Traceback (most recent call last):
                                                     File "/var/lib/kodi/.kodi/addons/script.copacetic.helper/plugin.py", line 6, in <module>
                                                       Main()
                                                     File "/var/lib/kodi/.kodi/addons/script.copacetic.helper/resources/lib/plugin/main.py", line 18, in __init__
                                                       self.getinfos()
                                                     File "/var/lib/kodi/.kodi/addons/script.copacetic.helper/resources/lib/plugin/main.py", line 45, in getinfos
                                                       self._execute(plugin, self.info)
                                                     File "/var/lib/kodi/.kodi/addons/script.copacetic.helper/resources/lib/plugin/main.py", line 54, in _execute
                                                       getattr(plugin, action.lower())()
                                                     File "/var/lib/kodi/.kodi/addons/script.copacetic.helper/resources/lib/plugin/content.py", line 183, in next_up
                                                       episode_details[0]['studio'] = studio
                                                       ~~~~~~~~~~~~~~~^^^
                                                   IndexError: list index out of range
                                                   -->End of Python script error report<--
realcopacetic commented 7 months ago

@DecentM Hi, that's strange, the version on the kodi official repository is 1.0.8 so not sure why you're stuck on 1.0.1.

That code relates to the Next Up widget, can you confirm if this is where you're seeing the error?

DecentM commented 7 months ago

The relation to the next up widget would make sense. This issue didn't pop up during playback, only while starting a new one or when the current one is ending.

The addon auto-updated in the meantime to 1.0.8, and it seems like this doesn't happen anymore. I'll close this but I'm open to discussion in the future if needed. Cheers!

llbstr commented 5 months ago

I have the exact same issue, with 1.0.11 helper addon, it happens when I go to the home menu.

If I disable the next up widget that solve the issue.

Whayme commented 5 months ago

Same behavior here on 1.0.12, also stops if I disable next up.

Here's my kodi log if that's worth anything: https://paste.kodi.tv/kanozoqeya

realcopacetic commented 5 months ago

I'm unable to replicate this but I think I have an idea of what may be the cause. @Whayme @llbstr @DecentM - are any of you using the skin from my repo instead of the kodi repo? If so, can you test with version 1.0.14 of the script and see if the issue persists?

Thanks!

llbstr commented 5 months ago

Issue is resolved on my setup, next up widget is showing and no notification. 1.0.14 version. cheers!

Whayme commented 5 months ago

Also resolved here, thank you!

realcopacetic commented 5 months ago

Great! I'll mark this as closed for now, thanks