[GH-ISSUE #1061] Python error of some sort #500

Closed
opened 2026-02-27 19:30:59 +03:00 by kerem · 2 comments
Owner

Originally created by @darth-untermensch on GitHub (Sep 30, 2022).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/1061

Describe the bug
Add-on fails to launch

To reproduce
Install and enable librespot. UI displays "failed to start" error message

Log

2022-09-30 23:15:50.361 T:4543     INFO <general>: Librespot: monitor started
2022-09-30 23:15:50.365 T:4543    ERROR <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                                    - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                                   Error Type: <class 'KeyError'>
                                                   Error Contents: 'kodi'
                                                   Traceback (most recent call last):
                                                     File "/storage/.kodi/addons/service.librespot/default.py", line 8, in <module>
                                                       Monitor().run()
                                                     File "/storage/.kodi/addons/service.librespot/resources/lib/ls_monitor.py", line 19, in run
                                                       librespot = Librespot()
                                                     File "/storage/.kodi/addons/service.librespot/resources/lib/ls_librespot.py", line 37, in __init__
                                                       settings = get_settings()
                                                     File "/storage/.kodi/addons/service.librespot/resources/lib/ls_addon.py", line 39, in get_settings
                                                       settings['name'] = settings['name'].format(socket.gethostname())
                                                   KeyError: 'kodi'
                                                   -->End of Python script error report<--
                                                   
2022-09-30 23:15:50.779 T:4543     INFO <general>: Python interpreter stopped
2022-09-30 23:16:50.835 T:1281    ERROR <general>: AddonVersion: 2.27.1 matrix.1 is not a valid version

Host (what you are running librespot on):

  • OS: LibreELEC 19.4
  • Platform: RPi 400

Additional context
Workaround from my end is changing line 39 of .kodi/addons/service.librespot/resources/lib/ls_addon.py:
from
settings['name'] = settings['name'].format(socket.gethostname())
to
settings['name'] = socket.gethostname()

I'm not sure what the underlying issue is or whether this workaround is even safe code at this point, but it seems to work for the moment.

Originally created by @darth-untermensch on GitHub (Sep 30, 2022). Original GitHub issue: https://github.com/librespot-org/librespot/issues/1061 **Describe the bug** Add-on fails to launch **To reproduce** Install and enable librespot. UI displays "failed to start" error message **Log** ``` 2022-09-30 23:15:50.361 T:4543 INFO <general>: Librespot: monitor started 2022-09-30 23:15:50.365 T:4543 ERROR <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<-- - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS! Error Type: <class 'KeyError'> Error Contents: 'kodi' Traceback (most recent call last): File "/storage/.kodi/addons/service.librespot/default.py", line 8, in <module> Monitor().run() File "/storage/.kodi/addons/service.librespot/resources/lib/ls_monitor.py", line 19, in run librespot = Librespot() File "/storage/.kodi/addons/service.librespot/resources/lib/ls_librespot.py", line 37, in __init__ settings = get_settings() File "/storage/.kodi/addons/service.librespot/resources/lib/ls_addon.py", line 39, in get_settings settings['name'] = settings['name'].format(socket.gethostname()) KeyError: 'kodi' -->End of Python script error report<-- 2022-09-30 23:15:50.779 T:4543 INFO <general>: Python interpreter stopped 2022-09-30 23:16:50.835 T:1281 ERROR <general>: AddonVersion: 2.27.1 matrix.1 is not a valid version ``` **Host (what you are running `librespot` on):** - OS: LibreELEC 19.4 - Platform: RPi 400 **Additional context** Workaround from my end is changing line 39 of `.kodi/addons/service.librespot/resources/lib/ls_addon.py`: from ` settings['name'] = settings['name'].format(socket.gethostname())` to ` settings['name'] = socket.gethostname()` I'm not sure what the underlying issue is or whether this workaround is even safe code at this point, but it seems to work for the moment.
kerem 2026-02-27 19:30:59 +03:00
  • closed this issue
  • added the
    invalid
    label
Author
Owner

@roderickvd commented on GitHub (Oct 1, 2022):

You should report this upstream with Kodi.
librespot is not written in Python.

<!-- gh-comment-id:1264267685 --> @roderickvd commented on GitHub (Oct 1, 2022): You should report this upstream with Kodi. `librespot` is not written in Python.
Author
Owner

@shanemeagher commented on GitHub (Oct 1, 2022):

This is a LibreELEC addon that packages librespot so post issues here to get support:
https://forum.libreelec.tv/board/14-add-on-support/

<!-- gh-comment-id:1264318696 --> @shanemeagher commented on GitHub (Oct 1, 2022): This is a LibreELEC addon that packages librespot so post issues here to get support: https://forum.libreelec.tv/board/14-add-on-support/
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/librespot#500
No description provided.