plex-for-kodi
plex-for-kodi copied to clipboard
RPi4: AttributeError: 'NoneType' object has no attribute 'selectedServer'
Description:
On starting the Plex addon, the app gets stuck on the loading screen / animation.
Log message:
2023-01-13 18:54:22.794 T:842 info <general>: SETTINGS: __init__ # updateThread Started
2023-01-13 18:54:22.796 T:842 info <general>: SETTINGS: set_auto_update # auto
2023-01-13 18:54:22.864 T:913 info <general>: SETTINGS: run # Waiting
2023-01-13 18:54:37.321 T:821 info <general>: Loading skin file: /storage/.kodi/addons/script.plex/resources/skins/Main/1080i/script-plex-background.xml, load type: LOAD_ON_GUI_INIT
2023-01-13 18:54:37.401 T:930 error <general>: _________________________________________________________________________________
2023-01-13 18:54:37.401 T:930 error <general>: script.plex: ERROR:
2023-01-13 18:54:37.401 T:930 error <general>: Traceback (most recent call last):
2023-01-13 18:54:37.401 T:930 error <general>: File "/storage/.kodi/addons/script.plex/lib/main.py", line 79, in _main
2023-01-13 18:54:37.401 T:930 error <general>: if plex.init():
2023-01-13 18:54:37.401 T:930 error <general>: ^^^^^^^^^^^
2023-01-13 18:54:37.401 T:930 error <general>: File "/storage/.kodi/addons/script.plex/lib/plex.py", line 277, in init
2023-01-13 18:54:37.401 T:930 error <general>: with CallbackEvent(plexapp.util.APP, 'init'):
2023-01-13 18:54:37.401 T:930 error <general>: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-01-13 18:54:37.401 T:930 error <general>: File "/storage/.kodi/addons/script.plex/lib/plex.py", line 239, in __init__
2023-01-13 18:54:37.401 T:930 error <general>: self.context.on(self.signal, self.set)
2023-01-13 18:54:37.401 T:930 error <general>: File "/storage/.kodi/addons/script.plex/lib/_included_packages/plexnet/signalsmixin.py", line 15, in on
2023-01-13 18:54:37.401 T:930 error <general>: signal.connect(callback)
2023-01-13 18:54:37.401 T:930 error <general>: File "/storage/.kodi/addons/script.plex/lib/_included_packages/plexnet/signalslot/signal.py", line 96, in connect
2023-01-13 18:54:37.401 T:930 error <general>: if inspect.getargspec(slot).keywords is None:
2023-01-13 18:54:37.401 T:930 error <general>: ^^^^^^^^^^^^^^^^^^
2023-01-13 18:54:37.401 T:930 error <general>: AttributeError: module 'inspect' has no attribute 'getargspec'
2023-01-13 18:54:37.401 T:930 error <general>: _________________________________________________________________________________
2023-01-13 18:54:37.401 T:930 error <general>: `
2023-01-13 18:54:37.425 T:930 error <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <class 'AttributeError'>
Error Contents: 'NoneType' object has no attribute 'selectedServer'
Traceback (most recent call last):
File "/storage/.kodi/addons/script.plex/lib/windows/kodigui.py", line 105, in onInit
self.onFirstInit()
File "/storage/.kodi/addons/script.plex/lib/windows/background.py", line 23, in onFirstInit
self.function()
File "/storage/.kodi/addons/script.plex/lib/main.py", line 146, in _main
plexapp.util.APP.preShutdown()
File "/storage/.kodi/addons/script.plex/lib/_included_packages/plexnet/plexapp.py", line 112, in preShutdown
if SERVERMANAGER.selectedServer:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'selectedServer'
-->End of Python script error report<--
Details:
- Add-on version: 0.3.5
- Kodi version: devel-20230107134836-107a660
- OS Platform: arm
- Hardware: RPi4.arm
Checklist
- [x] I have included a link to a log (or at the very least a link to a forum post with a log) from a session that had the issue
- [X] I have added appropriate GitHub labels
Link to pastebin service: https://paste.hihn.org/dsbo/raw
Until Plex fixes these issues, you can use Don't Panic: https://forums.plex.tv/t/plexmod-for-kodi-18-19-20/481208
See https://github.com/Numergy/signalslot/commit/704926efc9c6e37deb78eb3bbd1e5cff17a96379. Edit your /storage/.kodi/addons/script.plex/lib/_included_packages/plexnet/signalslot/signal.py file and make sure that your connect method looks similar:
def connect(self, slot):
"""
Connect a callback ``slot`` to this signal.
"""
if not isinstance(slot, BaseSlot):
try:
if inspect.getfullargspec(slot).varkw is None:
raise exceptions.SlotMustAcceptKeywords(self, slot)
except TypeError:
if inspect.getfullargspec(slot.__call__).varkw is None:
raise exceptions.SlotMustAcceptKeywords(self, slot)
It worked fine for me after that.