[1] MLD-5.x / Systems / x86 Systeme (PC) / [MLD 5.5T] No module named 'importlib.metadata'
 

Offline EsJ

  • Newbie
  • *
  • Posts: 20
    • View Profile
[MLD 5.5T] No module named 'importlib.metadata'
« on: February 07, 2025, 21:50:31 »
Hi zusammen!

Ich habe unter MLD 5.5 testing/x86 und dem passenden Kodi 19.4 das Problem, dass seit neuestem diverse Kodi-Addons nicht mehr funktionieren, Netflix, Radio.de Light, Soundcloud, Artistslideshow etc.
Offenbar ist irgendwas an Python buggy, denn es wird das Modul importlib.metadata gesucht.

Es sind zwei Python-Versionen auf dem MLD installiert:

Code: [Select]
vdr2> python --version
Python 2.7.16

vdr2> python3 --version
Python 3.7.3

https://www.youtube.com/watch?v=jooC4mUV-pY hat erzählt, dass importlib.metadata erst per default ab Python 3.8 dabei wäre und alles drunter würde per Backport-Library importlib_metadata erledigt werden können.

Das Modul importlib.metadata bzw. importlib_metadata irgendwie via pip nachzuinstallieren schlug auch fehl.
Na ja, da eigentlich viel Python  auf so einem System verwendet wird, ist die Hälfte nicht mehr brauchbar,

Beispiel:

Code: [Select]
2025-02-07 21:20:08.978 T:4140    ERROR <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                                    - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                                   Error Type: <class 'ModuleNotFoundError'>
                                                   Error Contents: No module named 'importlib.metadata'
                                                   Traceback (most recent call last):
                                                     File "/root/.kodi/addons/script.artistslideshow/default.py", line 1, in <module>
                                                       import resources.lib.artistslideshow as ArtistSlideshow
                                                     File "/root/.kodi/addons/script.artistslideshow/resources/lib/artistslideshow.py", line 31, in <module>
                                                       from resources.plugins import *
                                                     File "/root/.kodi/addons/script.artistslideshow/resources/plugins/fanarttv.py", line 8, in <module>
                                                       from resources.lib.url import URL
                                                     File "/root/.kodi/addons/script.artistslideshow/resources/lib/url.py", line 4, in <module>
                                                       import requests as _requests
                                                     File "/root/.kodi/addons/script.module.requests/lib/requests/__init__.py", line 43, in <module>
                                                       import urllib3
                                                     File "/root/.kodi/addons/script.module.urllib3/lib/urllib3/__init__.py", line 18, in <module>
                                                       from .connectionpool import HTTPConnectionPool, HTTPSConnectionPool, connection_from_url
                                                     File "/root/.kodi/addons/script.module.urllib3/lib/urllib3/connectionpool.py", line 15, in <module>
                                                       from ._request_methods import RequestMethods
                                                     File "/root/.kodi/addons/script.module.urllib3/lib/urllib3/_request_methods.py", line 10, in <module>
                                                       from .response import BaseHTTPResponse
                                                     File "/root/.kodi/addons/script.module.urllib3/lib/urllib3/response.py", line 48, in <module>
                                                       from .connection import BaseSSLError, HTTPConnection, HTTPException
                                                     File "/root/.kodi/addons/script.module.urllib3/lib/urllib3/connection.py", line 24, in <module>
                                                       from .http2 import probe as http2_probe
                                                     File "/root/.kodi/addons/script.module.urllib3/lib/urllib3/http2/__init__.py", line 3, in <module>
                                                       from importlib.metadata import version
                                                   ModuleNotFoundError: No module named 'importlib.metadata'
                                                   -->End of Python script error report<--
                                                   
2025-02-07 21:20:09.032 T:4140     INFO <general>: Python interpreter stopped


2025-02-07 21:43:27.601 T:4351     INFO <general>: WEATHER: Downloading weather
2025-02-07 21:43:27.602 T:4353     INFO <general>: initializing python engine.
2025-02-07 21:43:27.771 T:4353    ERROR <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                                    - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                                   Error Type: <class 'ModuleNotFoundError'>
                                                   Error Contents: No module named 'importlib.metadata'
                                                   Traceback (most recent call last):
                                                     File "/root/.kodi/addons/weather.gismeteo/default.py", line 13, in <module>
                                                       from resources.libs import Gismeteo, GismeteoError, Location, Weather, WebClientError
                                                     File "/root/.kodi/addons/weather.gismeteo/resources/libs/__init__.py", line 10, in <module>
                                                       from .gismeteo import GismeteoError, GismeteoClient
                                                     File "/root/.kodi/addons/weather.gismeteo/resources/libs/gismeteo.py", line 9, in <module>
                                                       import requests
                                                     File "/root/.kodi/addons/script.module.requests/lib/requests/__init__.py", line 43, in <module>
                                                       import urllib3
                                                     File "/root/.kodi/addons/script.module.urllib3/lib/urllib3/__init__.py", line 18, in <module>
                                                       from .connectionpool import HTTPConnectionPool, HTTPSConnectionPool, connection_from_url
                                                     File "/root/.kodi/addons/script.module.urllib3/lib/urllib3/connectionpool.py", line 15, in <module>
                                                       from ._request_methods import RequestMethods
                                                     File "/root/.kodi/addons/script.module.urllib3/lib/urllib3/_request_methods.py", line 10, in <module>
                                                       from .response import BaseHTTPResponse
                                                     File "/root/.kodi/addons/script.module.urllib3/lib/urllib3/response.py", line 48, in <module>
                                                       from .connection import BaseSSLError, HTTPConnection, HTTPException
                                                     File "/root/.kodi/addons/script.module.urllib3/lib/urllib3/connection.py", line 24, in <module>
                                                       from .http2 import probe as http2_probe
                                                     File "/root/.kodi/addons/script.module.urllib3/lib/urllib3/http2/__init__.py", line 3, in <module>
                                                       from importlib.metadata import version
                                                   ModuleNotFoundError: No module named 'importlib.metadata'
                                                   -->End of Python script error report<--
                                                   
2025-02-07 21:43:27.832 T:4353     INFO <general>: Python interpreter stopped
2025-02-07 21:43:53.676 T:1664    ERROR <general>: Control 55 in window 10502 has been asked to focus, but it can't
2025-02-07 21:43:53.707 T:4357     INFO <general>: initializing python engine.
2025-02-07 21:43:53.835 T:4357    ERROR <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                                    - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                                   Error Type: <class 'ModuleNotFoundError'>
                                                   Error Contents: No module named 'importlib.metadata'
                                                   Traceback (most recent call last):
                                                     File "/root/.kodi/addons/plugin.audio.soundcloud/addon.py", line 1, in <module>
                                                       from resources import plugin
                                                     File "/root/.kodi/addons/plugin.audio.soundcloud/resources/plugin.py", line 1, in <module>
                                                       from resources.lib.soundcloud.api_v2 import ApiV2
                                                     File "/root/.kodi/addons/plugin.audio.soundcloud/resources/lib/soundcloud/api_v2.py", line 4, in <module>
                                                       import requests
                                                     File "/root/.kodi/addons/script.module.requests/lib/requests/__init__.py", line 43, in <module>
                                                       import urllib3
                                                     File "/root/.kodi/addons/script.module.urllib3/lib/urllib3/__init__.py", line 18, in <module>
                                                       from .connectionpool import HTTPConnectionPool, HTTPSConnectionPool, connection_from_url
                                                     File "/root/.kodi/addons/script.module.urllib3/lib/urllib3/connectionpool.py", line 15, in <module>
                                                       from ._request_methods import RequestMethods
                                                     File "/root/.kodi/addons/script.module.urllib3/lib/urllib3/_request_methods.py", line 10, in <module>
                                                       from .response import BaseHTTPResponse
                                                     File "/root/.kodi/addons/script.module.urllib3/lib/urllib3/response.py", line 48, in <module>
                                                       from .connection import BaseSSLError, HTTPConnection, HTTPException
                                                     File "/root/.kodi/addons/script.module.urllib3/lib/urllib3/connection.py", line 24, in <module>
                                                       from .http2 import probe as http2_probe
                                                     File "/root/.kodi/addons/script.module.urllib3/lib/urllib3/http2/__init__.py", line 3, in <module>
                                                       from importlib.metadata import version
                                                   ModuleNotFoundError: No module named 'importlib.metadata'
                                                   -->End of Python script error report<--
                                                   
2025-02-07 21:43:53.890 T:4357     INFO <general>: Python interpreter stopped
2025-02-07 21:43:53.908 T:4356    ERROR <general>: GetDirectory - Error getting plugin://plugin.audio.soundcloud/
2025-02-07 21:43:53.917 T:1664    ERROR <general>: CGUIMediaWindow::GetDirectory(plugin://plugin.audio.soundcloud/) failed


Wie bekomme ich das gelöst?

Danke euch und viele Grüße, EsJ

Online clausmuus

  • Administrator
  • Expert Member
  • ********
  • Posts: 20677
    • View Profile
    • ClausMuus.de
[MLD 5.5T] No module named 'importlib.metadata'
« Reply #1 on: February 07, 2025, 22:28:12 »
Am einfachsten gehst Du auf einem Snapshot zurück, bei dem das noch funktioniert hat.
Oder Du wechselst zu der MLD-6, wo es dann die neuste Kodi Version gibt.
MLD 5.5 - Raspberry PI - 7" Touch TFT - Squeeze Play
MLD 6.5 - lirc yaUsbIR - OctopusNet - XFX GeForce 9300 mit Intel E3200 - 2GB RAM - 22TB HDD - Lian Li PC-C37B - Samsung LE40A559

Offline EsJ

  • Newbie
  • *
  • Posts: 20
    • View Profile
[MLD 5.5T] No module named 'importlib.metadata'
« Reply #2 on: February 07, 2025, 23:43:34 »
Ok, dann versuche ich eher die Flucht nach vorne, da das Problem ggf. sonst bei irgendwelchen Updates wieder auftreten kann.

Danke und Gruß, EsJ

Offline EsJ

  • Newbie
  • *
  • Posts: 20
    • View Profile
[MLD 5.5T] No module named 'importlib.metadata'
« Reply #3 on: February 17, 2025, 20:29:00 »
Hi zusammen,

ich will kurz erfolgreichen Vollzug melden. Nun läuft MLD 6.5T mit Kodi 21.2 (Flatpack) mit einigen Addons wie Netflix, Spotify, Soundcloud & Co. Python funktioniert erwartungsgemäß auch wieder.

Erstmal ein großes Lob für die 6.5 und danke für eure Arbeit, sie ist sehr gelungen!

Hier und da gibt es noch ein paar Ungereimtheiten bzw. ist der Status wie folgt:

- Setup MLD: Ich hatte im Setup testweise Squeezeplay aktiviert. Mangels Soundquelle ist das Setup dort hängen geblieben, ich habe dann übers Webif auf eine andere App umgeschaltet und das Setup abgewürgt.
- Wie komme ich ohne Webif beim Beenden von Kodi auf eine andere App? Früher gab es mal ein Auswahlmenü, muss das gesondert konfiguriert werden?
- Kodi / Spotify: Einzelne Titel sind problemlos, bei längeren oder langen Playlists werden manche Titel übersprungen oder crasht. Das dürfte aber eher ein Kodi-Addonthema sein.
- Kodi / Soundcloud: Bekannter Fehler im Audio-Fomat, dass längere Stücke einfach abbrechen und auch keinen bekannten Einsprungpunkt haben. Auch das empfohlene "mp3 (progressive)" hilft da nicht. Auch ein Kodi-Addonthema.
- Kodi / Radio.de (bzw. Ersatz Radio.de-Light): Radio.de hat den API-Connect für den Raum "DE" abgestellt. Für "ES" könnte es noch gehen oder eben Radio.de-Light mit minimalem Funktionsumfang verwenden. Auch ein Kodi-Addonthema.
- Kodi / Netflix: Die Anmeldung klappt prima über einen Authentication-Key.

- Musik via Airplay oder Bluetooth auf den MLD: Hat jemand das schon mal als Alternative zu Kodi/Spotify über irgendwie hinbekommen?
- Ich habe ein Alphacool-LCD (USB). LCDd ist installiert, aber ist nicht gestartet. Muss ich mal noch https://www.minidvblinux.de/forum/index.php/topic,10732.msg85762.html#msg85762 genauer anschauen.

Viele Grüße, EsJ

Online clausmuus

  • Administrator
  • Expert Member
  • ********
  • Posts: 20677
    • View Profile
    • ClausMuus.de
[MLD 5.5T] No module named 'importlib.metadata'
« Reply #4 on: February 18, 2025, 14:11:34 »
- Um den SqueezePlayer nutzen zu können musst Du auch einen Squeeze Server (LMS) betreiben. Dieser kann auf dem selben Gerät installiert werden, aber auch auf einem Server in Deinem Netzwerk, der von diversen SqueezePlayern gemeinsam genutzt wird. Einer der großen Vorteile des SqueezePlayers ist, dass die Wiedergabe zwischen allen Synchronisiert werden kann.
- Aktuell musst Du nach beenden von Kodi aktiv eine andere App aufrufen. Das geht z.B. durch Drücken der Kombination Windows + A
- Du kannst den SqueezePlayer als Abspielgerät für Spotify verwenden. Auch ein Abspielen von Youtube Musik ist z.B. über die "Send to Kodi" Funktion möglich.
- Um LCDd nutzen zu können, musst Du das zuvor konfigurieren. Dafür gibt es unter /etc/LCDd eine Konfigurationsdatei. Im Webif ist diese Konfiguration noch nicht integriert.
MLD 5.5 - Raspberry PI - 7" Touch TFT - Squeeze Play
MLD 6.5 - lirc yaUsbIR - OctopusNet - XFX GeForce 9300 mit Intel E3200 - 2GB RAM - 22TB HDD - Lian Li PC-C37B - Samsung LE40A559

[1] MLD-5.x / Systems / x86 Systeme (PC) / [MLD 5.5T] No module named 'importlib.metadata'
 



Users Online Users Online

0 Members and 1 Guest are viewing this topic.