yllar / plugin.video.jupiter.err.ee

8 stars 5 forks source link

Some shows fail to load due to empty verticalPhotos list #3

Closed pr11t closed 3 years ago

pr11t commented 3 years ago

Playing some shows fails with the following error:

ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
    - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.IndexError'>
Error Contents: list index out of range
Traceback (most recent call last):
    File "/home/priit/.kodi/addons/plugin.video.jupiter.err.ee/addon.py", line 388, in <module>
    router(sys.argv[2][1:])
    File "/home/priit/.kodi/addons/plugin.video.jupiter.err.ee/addon.py", line 376, in router
    get_section(params['section'], params['sub'])
    File "/home/priit/.kodi/addons/plugin.video.jupiter.err.ee/addon.py", line 205, in get_section
    if 'photoUrlOriginal' in day['verticalPhotos'][0]:
IndexError: list index out of range
-->End of Python script error report<--

To reproduce, try opening "#Melomaania" from Saated A-Ü.

Jupiter API returns an empty verticalPhotos list in some cases, but this is not handled. https://github.com/yllar/plugin.video.jupiter.err.ee/blob/9d155d3aa328c4d3a2f84eabf56e42345548eff6/addon.py#L181-L182

And thank you for all the good work on the Kodi plugins :)

yllar commented 3 years ago

should be fixed in v0.0.7

janwil123 commented 3 years ago

I am still getting a similar error in version 0.0.7 when trying to load 'Filmid' menu item for example.

2021-08-30 20:24:57.022 T:20306 ERROR : EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--

yllar commented 3 years ago

Please try 0.0.8, this error should be fixed.

janwil123 commented 3 years ago

Indeed, "Filmid" menu item now works as well.

Thanks a lot and keep up the good work! Jan