anxdpanic / plugin.video.twitch

Watch your favorite gaming streams on Kodi
https://twitchaddon.page.link/forum
271 stars 79 forks source link

Receive Error when trying to view Following Live Channels list #485

Closed Wibbbs closed 4 years ago

Wibbbs commented 4 years ago

Whenever I try open my Following Live Channel list I get an error from the addon. Everything else works fine I can view streams from the featured streams list and even when I view my "Followed" list I can see all my follwed streamers so it seems my api token is working fine. It is only when I try to open the Follwing Live Channels list. Below is the excerpt from the kodi log when the error occurs.

Addon: 2.4.8 Kodi: 18.5

2020-02-23 13:33:38.549 T:1936855056   DEBUG: CGUIMediaWindow::GetDirectory (plugin://plugin.video.twitch/?content=live&mode=followed)
2020-02-23 13:33:38.549 T:1936855056   DEBUG:   ParentPath = [plugin://plugin.video.twitch/]
2020-02-23 13:33:38.549 T:1377821568   DEBUG: Thread JobWorker start, auto delete: true
2020-02-23 13:33:38.551 T:1419752320   DEBUG: Thread waiting start, auto delete: false
2020-02-23 13:33:38.564 T:1377821568   DEBUG: CAddonDatabase::SetLastUsed[plugin.video.twitch] took 15 ms
2020-02-23 13:33:38.565 T:1663521664   DEBUG: Thread JobWorker start, auto delete: true
2020-02-23 13:33:38.565 T:1419752320   DEBUG: StartScript - calling plugin Twitch('plugin://plugin.video.twitch/','10','?content=live&mode=followed','resume:false')
2020-02-23 13:33:38.566 T:1419752320   DEBUG: GetLanguageInvoker - Reusing LanguageInvokerThread 19 for script /storage/.kodi/addons/plugin.video.twitch/resources/lib/addon_runner.py
2020-02-23 13:33:38.566 T:1352643456    INFO: initializing python engine.
2020-02-23 13:33:38.566 T:1352643456   DEBUG: CPythonInvoker(19, /storage/.kodi/addons/plugin.video.twitch/resources/lib/addon_runner.py): start processing
2020-02-23 13:33:38.566 T:1352643456   DEBUG: CPythonInvoker(19, /storage/.kodi/addons/plugin.video.twitch/resources/lib/addon_runner.py): entering source directory /storage/.kodi/addons/plugin.video.twitch/resources/lib
2020-02-23 13:33:38.566 T:1352643456   DEBUG: CPythonInvoker(19, /storage/.kodi/addons/plugin.video.twitch/resources/lib/addon_runner.py): instantiating addon using automatically obtained id of "plugin.video.twitch" dependent on version 2.20.0 of the xbmc.python api
2020-02-23 13:33:38.571 T:1352643456   DEBUG: Twitch: Version: |2.4.8| Application Version: |Kodi| |18.5 Git:newclock5_18.5-Leia| -> |18|5|Leia|0|| (ENCODED)
2020-02-23 13:33:38.571 T:1352643456   DEBUG: Twitch: Queries: |{'content': 'live', 'mode': 'followed'}| Args: |['plugin://plugin.video.twitch/', '10', '?content=live&mode=followed', 'resume:false']|
2020-02-23 13:33:38.573 T:1352643456   DEBUG: Twitch: Using method cache for: |twitch_addon.addon.api.Twitch.valid_token| -> |5|
2020-02-23 13:33:38.573 T:1352643456  NOTICE: Twitch: Calling |_list_followed| for mode |followed| with pos args |['live']| and kwargs |{}|
2020-02-23 13:33:38.579 T:1352643456   DEBUG: Twitch: Using method cache for: |twitch_addon.addon.api.Twitch.get_user| -> |511|
2020-02-23 13:33:38.608 T:1586463616   DEBUG: Previous line repeats 1 times.
2020-02-23 13:33:38.608 T:1586463616   DEBUG: PushCecKeypress - received key  b duration 70 (rep:0 size:0)
2020-02-23 13:33:38.608 T:1586463616   DEBUG: PushCecKeypress - ignored key  b
2020-02-23 13:33:38.642 T:1352643456   DEBUG: Twitch: Using method cache for: |twitch_addon.addon.api.Twitch.get_followed_streams| -> |21523|
2020-02-23 13:33:38.647 T:1352643456   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.KeyError'>
                                            Error Contents: '_total'
                                            Traceback (most recent call last):
                                              File "/storage/.kodi/addons/plugin.video.twitch/resources/lib/addon_runner.py", line 15, in <module>
                                                router.run(sys.argv)
                                              File "/storage/.kodi/addons/plugin.video.twitch/resources/lib/twitch_addon/router.py", line 297, in run
                                                dispatcher.dispatch(mode, queries)
                                              File "/storage/.kodi/addons/plugin.video.twitch/resources/lib/twitch_addon/addon/common/url_dispatcher.py", line 94, in dispatch
                                                self.func_registry[mode](*args, **kwargs)
                                              File "/storage/.kodi/addons/plugin.video.twitch/resources/lib/twitch_addon/addon/error_handling.py", line 29, in wrapper
                                                result = func(*args, **kwargs)
                                              File "/storage/.kodi/addons/plugin.video.twitch/resources/lib/twitch_addon/router.py", line 101, in _list_followed
                                                followed.route(twitch_api, content, offset, cursor)
                                              File "/storage/.kodi/addons/plugin.video.twitch/resources/lib/twitch_addon/routes/followed.py", line 37, in route
                                                if (streams[Keys.TOTAL] > 0) and (Keys.STREAMS in streams):
                                            KeyError: '_total'
                                            -->End of Python script error report<--
2020-02-23 13:33:38.647 T:1352643456   DEBUG: onExecutionDone(19, /storage/.kodi/addons/plugin.video.twitch/resources/lib/addon_runner.py)
2020-02-23 13:33:38.651 T:1936855056   DEBUG: ------ Window Init (DialogBusy.xml) ------
2020-02-23 13:33:38.752 T:1936855056   DEBUG: ------ Window Init (DialogNotification.xml) ------
2020-02-23 13:33:38.876 T:1352643456    INFO: Python interpreter stopped
2020-02-23 13:33:38.877 T:1352643456    INFO: Previous line repeats 2 times.
2020-02-23 13:33:38.877 T:1352643456   DEBUG: Thread LanguageInvoker 1352643456 terminating
2020-02-23 13:33:38.887 T:1419752320   ERROR: GetDirectory - Error getting plugin://plugin.video.twitch/?content=live&mode=followed
2020-02-23 13:33:38.888 T:1419752320   DEBUG: Thread waiting 1419752320 terminating
2020-02-23 13:33:38.888 T:1936855056   DEBUG: ------ Window Deinit (DialogBusy.xml) ------
2020-02-23 13:33:38.889 T:1936855056   ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.video.twitch/?content=live&mode=followed) failed
2020-02-23 13:33:38.889 T:1936855056   DEBUG: CGUIMediaWindow::GetDirectory (plugin://plugin.video.twitch/)
2020-02-23 13:33:38.889 T:1936855056   DEBUG:   ParentPath = [plugin://plugin.video.twitch/]
2020-02-23 13:33:38.890 T:1663521664   DEBUG: CAddonDatabase::SetLastUsed[plugin.video.twitch] took 0 ms
2020-02-23 13:33:38.891 T:1419752320   DEBUG: Thread waiting start, auto delete: false
2020-02-23 13:33:38.892 T:1419752320   DEBUG: StartScript - calling plugin Twitch('plugin://plugin.video.twitch/','11','','resume:false')
2020-02-23 13:33:38.892 T:1352643456   DEBUG: Thread LanguageInvoker start, auto delete: false
2020-02-23 13:33:38.892 T:1352643456    INFO: initializing python engine.
2020-02-23 13:33:38.892 T:1352643456   DEBUG: CPythonInvoker(20, /storage/.kodi/addons/plugin.video.twitch/resources/lib/addon_runner.py): start processing
2020-02-23 13:33:38.922 T:1352643456   DEBUG: -->Python Interpreter Initialized<--
2020-02-23 13:33:38.923 T:1352643456   DEBUG: CPythonInvoker(20, /storage/.kodi/addons/plugin.video.twitch/resources/lib/addon_runner.py): the source file to load is "/storage/.kodi/addons/plugin.video.twitch/resources/lib/addon_runner.py"
2020-02-23 13:33:38.925 T:1352643456   DEBUG: CPythonInvoker(20, /storage/.kodi/addons/plugin.video.twitch/resources/lib/addon_runner.py): setting the Python path to /storage/.kodi/addons/plugin.video.twitch/resources/lib:/storage/.kodi/addons/script.module.certifi/lib:/storage/.kodi/addons/script.module.chardet/lib:/storage/.kodi/addons/script.module.idna/lib:/storage/.kodi/addons/script.module.python.twitch/resources/lib:/storage/.kodi/addons/script.module.requests/lib:/storage/.kodi/addons/script.module.six/lib:/storage/.kodi/addons/script.module.urllib3/lib:/usr/lib/python27.zip:/usr/lib/python2.7:/usr/lib/python2.7/plat-linux2:/usr/lib/python2.7/lib-tk:/usr/lib/python2.7/lib-old:/usr/lib/python2.7/lib-dynload:/usr/lib/python2.7/site-packages:/usr/lib/python2.7/site-packages/gtk-2.0
2020-02-23 13:33:38.925 T:1352643456   DEBUG: CPythonInvoker(20, /storage/.kodi/addons/plugin.video.twitch/resources/lib/addon_runner.py): entering source directory /storage/.kodi/addons/plugin.video.twitch/resources/lib
2020-02-23 13:33:38.925 T:1352643456   DEBUG: CPythonInvoker(20, /storage/.kodi/addons/plugin.video.twitch/resources/lib/addon_runner.py): instantiating addon using automatically obtained id of "plugin.video.twitch" dependent on version 2.20.0 of the xbmc.python api
2020-02-23 13:33:38.991 T:1936855056   DEBUG: ------ Window Init (DialogBusy.xml) ------
2020-02-23 13:33:39.035 T:1352643456   DEBUG: CAddonSettings[plugin.video.twitch]: loading setting definitions
2020-02-23 13:33:39.035 T:1352643456   DEBUG: CAddonSettings[plugin.video.twitch]: trying to load setting definitions from old format...
2020-02-23 13:33:39.040 T:1352643456   DEBUG: CAddonSettings[plugin.video.twitch]: loading setting values
2020-02-23 13:33:39.041 T:1352643456   DEBUG: CSettingsManager: requested setting (clear_community_blacklist) was not found.
2020-02-23 13:33:39.041 T:1352643456   DEBUG: CAddonSettings[plugin.video.twitch]: failed to find definition for setting clear_community_blacklist. Creating a setting on-the-fly...
2020-02-23 13:33:39.041 T:1352643456   DEBUG: CSettingsManager: requested setting (clear_previews) was not found.
2020-02-23 13:33:39.041 T:1352643456   DEBUG: CAddonSettings[plugin.video.twitch]: failed to find definition for setting clear_previews. Creating a setting on-the-fly...
2020-02-23 13:33:39.041 T:1352643456   DEBUG: CSettingsManager: requested setting (live_previews_enable) was not found.
2020-02-23 13:33:39.041 T:1352643456   DEBUG: CAddonSettings[plugin.video.twitch]: failed to find definition for setting live_previews_enable. Creating a setting on-the-fly...
2020-02-23 13:33:39.042 T:1352643456   DEBUG: CSettingsManager: requested setting (menu_browse_communities) was not found.
2020-02-23 13:33:39.042 T:1352643456   DEBUG: CAddonSettings[plugin.video.twitch]: failed to find definition for setting menu_browse_communities. Creating a setting on-the-fly...
2020-02-23 13:33:39.042 T:1352643456   DEBUG: CSettingsManager: requested setting (menu_browse_playlists) was not found.
2020-02-23 13:33:39.042 T:1352643456   DEBUG: CAddonSettings[plugin.video.twitch]: failed to find definition for setting menu_browse_playlists. Creating a setting on-the-fly...
2020-02-23 13:33:39.042 T:1352643456   DEBUG: CSettingsManager: requested setting (menu_following_playlists) was not found.
2020-02-23 13:33:39.042 T:1352643456   DEBUG: CAddonSettings[plugin.video.twitch]: failed to find definition for setting menu_following_playlists. Creating a setting on-the-fly...
2020-02-23 13:33:39.042 T:1352643456   DEBUG: CSettingsManager: requested setting (notify_refresh) was not found.
2020-02-23 13:33:39.042 T:1352643456   DEBUG: CAddonSettings[plugin.video.twitch]: failed to find definition for setting notify_refresh. Creating a setting on-the-fly...
2020-02-23 13:33:39.042 T:1352643456   DEBUG: CSettingsManager: requested setting (refresh_previews) was not found.
2020-02-23 13:33:39.042 T:1352643456   DEBUG: CAddonSettings[plugin.video.twitch]: failed to find definition for setting refresh_previews. Creating a setting on-the-fly...
2020-02-23 13:33:39.042 T:1352643456   DEBUG: CSettingsManager: requested setting (remove_community_blacklist) was not found.
2020-02-23 13:33:39.042 T:1352643456   DEBUG: CAddonSettings[plugin.video.twitch]: failed to find definition for setting remove_community_blacklist. Creating a setting on-the-fly...
2020-02-23 13:33:39.043 T:1352643456   DEBUG: CSettingsManager: requested setting (use_cache) was not found.
2020-02-23 13:33:39.076 T:1352643456 WARNING: script.module.python.twitch: API version |V5| is deprecated, update to |Helix| by |TBD|
2020-02-23 13:33:39.669 T:1352643456   DEBUG: Twitch: Version: |2.4.8| Application Version: |Kodi| |18.5 Git:newclock5_18.5-Leia| -> |18|5|Leia|0|| (ENCODED)
2020-02-23 13:33:39.669 T:1352643456   DEBUG: Twitch: Queries: |{'mode': 'main'}| Args: |['plugin://plugin.video.twitch/', '11', '', 'resume:false']|
2020-02-23 13:33:39.670 T:1352643456   DEBUG: Twitch: Using method cache for: |twitch_addon.addon.api.Twitch.valid_token| -> |5|
2020-02-23 13:33:39.670 T:1352643456  NOTICE: Twitch: Calling |_main| for mode |main| with pos args |[]| and kwargs |{}|
2020-02-23 13:33:40.163 T:1352643456    INFO: CPythonInvoker(20, /storage/.kodi/addons/plugin.video.twitch/resources/lib/addon_runner.py): script successfully run
2020-02-23 13:33:40.164 T:1419752320   DEBUG: Thread waiting 1419752320 terminating
2020-02-23 13:33:40.171 T:1936855056   DEBUG: ------ Window Deinit (DialogBusy.xml) ------
2020-02-23 13:33:40.177 T:1419752320   DEBUG: Thread BackgroundLoader start, auto delete: false
2020-02-23 13:33:40.207 T:1419752320   DEBUG: Thread BackgroundLoader 1419752320 terminating
2020-02-23 13:33:44.237 T:1936855056   DEBUG: ------ Window Deinit (DialogNotification.xml) ------
2020-02-23 13:34:08.890 T:1377821568   DEBUG: Thread JobWorker 1377821568 terminating (autodelete)
2020-02-23 13:34:08.891 T:1663521664   DEBUG: Thread JobWorker 1663521664 terminating (autodelete)
Wibbbs commented 4 years ago

I just noticed an alpha version that looks like it might fix this issue. I will try and report back.

Quick question what is the different between the unofficial and the regular release?

Wibbbs commented 4 years ago

I just tried 2.4.9 alpha and it corrected the issue. Thanks!

Still curious as to what the unofficial release is?