diff --git a/jellyfin_kodi/jellyfin/http.py b/jellyfin_kodi/jellyfin/http.py index a3027ca4..63c0f570 100644 --- a/jellyfin_kodi/jellyfin/http.py +++ b/jellyfin_kodi/jellyfin/http.py @@ -173,6 +173,9 @@ class HTTP(object): return clean_none_dict_values(response) except ValueError: return + except TypeError: + # Empty json + return def _request(self, data): diff --git a/jellyfin_kodi/jellyfin/ws_client.py b/jellyfin_kodi/jellyfin/ws_client.py index 3ba8d6b3..30f4c831 100644 --- a/jellyfin_kodi/jellyfin/ws_client.py +++ b/jellyfin_kodi/jellyfin/ws_client.py @@ -10,7 +10,11 @@ from kodi_six import xbmc from helper import LazyLogger -import websocket +# If numpy is installed, the websockets library tries to use it, and then +# kodi hard crashes for reasons I don't even want to pretend to understand +import sys # noqa: E402,I100 +sys.modules['numpy'] = None +import websocket # noqa: E402,I201 ##################################################################################################