# Bugreport in linuxmuster-api7 unter Python

**URL:** <https://ask.linuxmuster.net/t/bugreport-in-linuxmuster-api7-unter-python/12081>\
**Category:** Server\
**Tags:** lmn7, edulution\
**Created:** [4. März 2026 um 16:20 UTC](https://ask.linuxmuster.net/t/bugreport-in-linuxmuster-api7-unter-python/12081 "2026-03-04T16:20:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![LPGTX](https://ask.linuxmuster.net/letter_avatar_proxy/v4/letter/l/dbc845/32.png) [@LPGTX](https://ask.linuxmuster.net/u/LPGTX)\
**Post date:** [4. März 2026 um 16:20 UTC](https://ask.linuxmuster.net/t/bugreport-in-linuxmuster-api7-unter-python/12081/1 "2026-03-04T16:20:06Z")

</div>

Hallo Zusammen,

ich habe heute beim Aktualisieren einer unserer Linuxmuster Server festgestellt, dass der Dienst linuxmuster-api nicht mehr lief und sich auch nicht starten ließ:

```auto
● linuxmuster-api.service - linuxmuster.net API
     Loaded: loaded (/usr/lib/systemd/system/linuxmuster-api.service; enabled; preset: enabled)
     Active: failed (Result: exit-code) since Wed 2026-03-04 16:37:24 CET; 5min ago
   Duration: 4.260s
    Process: 3614 ExecStart=/opt/linuxmuster/bin/python3 /usr/lib/python3/dist-packages/linuxmusterApi/main.py (code=exited, status=1/FAILURE)
   Main PID: 3614 (code=exited, status=1/FAILURE)
        CPU: 4.259s

Mär 04 16:37:24 server.lan python3[3614]: File "/usr/lib/python3/dist-packages/linuxmusterApi/main.py", line 50, in <module>
Mär 04 16:37:24 server.lan python3[3614]: from routers_v1 import (
Mär 04 16:37:24 server.lan python3[3614]: File "/usr/lib/python3/dist-packages/linuxmusterApi/routers_v1/devices.py", line 9, in <module>
Mär 04 16:37:24 server.lan python3[3614]: from utils.sophomorix import lmn_getSophomorixValue
Mär 04 16:37:24 server.lan python3[3614]: File "/usr/lib/python3/dist-packages/linuxmusterApi/utils/sophomorix.py", line 10, in <module>
Mär 04 16:37:24 server.lan python3[3614]: from checks import check_tmp_dir
Mär 04 16:37:24 server.lan python3[3614]: ModuleNotFoundError: No module named 'checks'
Mär 04 16:37:24 server.lan systemd[1]: linuxmuster-api.service: Main process exited, code=exited, status=1/FAILURE
Mär 04 16:37:24 server.lan systemd[1]: linuxmuster-api.service: Failed with result 'exit-code'.
Mär 04 16:37:24 server.lan systemd[1]: linuxmuster-api.service: Consumed 4.259s CPU time.

```

Es betrifft die Version

```auto
linuxmuster-api7:
  Installiert: 7.3.31
  Installationskandidat: 7.3.31

```

Ursache ist wohl eine Änderung des Importverhaltens unter Python ≥ 3.12

Behoben habe ich das Problem wie folgt:

In

`/usr/lib/python3/dist-packages/linuxmusterApi/utils/sophomorix.py`

steht:

```auto
from checks import check_tmp_dir

```

Python sucht dabei ein globales Modul **`checks`** und nicht:

`linuxmusterApi.utils.checks`

Früher hat das anscheinend funktioniert, jetzt nicht mehr.

* * *

## Lösung

Datei öffnen

```auto
sudo nano /usr/lib/python3/dist-packages/linuxmusterApi/utils/sophomorix.py

```

**ALT**

```auto
from checks import check_tmp_dir

```

**NEU**

```auto
from .checks import check_tmp_dir

```

Speichern, dann:

```auto
sudo systemctl restart linuxmuster-api
sudo systemctl status linuxmuster-api

```

Der Dienst startet danach sofort.

```auto
● linuxmuster-api.service - linuxmuster.net API
     Loaded: loaded (/usr/lib/systemd/system/linuxmuster-api.service; enabled; preset: enabled)
     Active: active (running) since Wed 2026-03-04 16:48:21 CET; 11s ago
   Main PID: 3896 (python3)
      Tasks: 1 (limit: 19092)
     Memory: 93.2M (peak: 93.4M)
        CPU: 1.993s
     CGroup: /system.slice/linuxmuster-api.service
             └─3896 /opt/linuxmuster/bin/python3 /usr/lib/python3/dist-packages/linuxmusterApi/main.py

Mär 04 16:48:21 server.lan systemd[1]: Started linuxmuster-api.service - linuxmuster.net API.
Mär 04 16:48:23 server.lan python3[3896]: 2026-03-04 16:48:23,495 - uvicorn.error - INFO - Started server process [3896]
Mär 04 16:48:23 server.lan python3[3896]: 2026-03-04 16:48:23,496 - uvicorn.error - INFO - Waiting for application startup.
Mär 04 16:48:23 server.lan python3[3896]: 2026-03-04 16:48:23,497 - uvicorn.error - INFO - Application startup complete.
Mär 04 16:48:23 server.lan python3[3896]: 2026-03-04 16:48:23,497 - uvicorn.error - INFO - Uvicorn running on https://0.0.0.0:8001 (Press CTRL+C to quit)

```

Ich hoffe das hilft anderen weiter die vielleicht in den selben Fehler laufen bzw. es kann mit einem Update zentral gefixt werden.

Viele Grüße  
Luca

---

<div class="post-metadata">

**Author:** ![Arnaud](https://ask.linuxmuster.net/user_avatar/ask.linuxmuster.net/arnaud/32/28_2.png) [@Arnaud](https://ask.linuxmuster.net/u/Arnaud)\
**Post date:** [4. März 2026 um 16:29 UTC](https://ask.linuxmuster.net/t/bugreport-in-linuxmuster-api7-unter-python/12081/2 "2026-03-04T16:29:52Z")

</div>

Hallo Luca,

Danke für die Mitteilung.

Ich habe sofort meine Typo in einem neuen Paket korrigiert 🙂

Gruß

Arnaud

---

<div class="post-metadata">

**Author:** ![sucher](https://ask.linuxmuster.net/letter_avatar_proxy/v4/letter/s/50afbb/32.png) [@sucher](https://ask.linuxmuster.net/u/sucher)\
**Post date:** [19. März 2026 um 12:10 UTC](https://ask.linuxmuster.net/t/bugreport-in-linuxmuster-api7-unter-python/12081/3 "2026-03-19T12:10:08Z")

</div>

Hallo Arnaud

bei mir startet die linuxmuster-api beim server neustart nicht sauber. Der Service möchte sich zu früh mit LinuxmusterTools verbinden. Die linuxmuster-api.service Datei sollte entsprechend angepasst werden, denn ein systemctl restart linuxmuster-api.service funktioniert ohne probleme.  
ich hab  
After= samba-ad-dc.service  
Requires=samba-ad-dc.service  
hinzugefügt

---

<div class="post-metadata">

**Author:** ![Arnaud](https://ask.linuxmuster.net/user_avatar/ask.linuxmuster.net/arnaud/32/28_2.png) [@Arnaud](https://ask.linuxmuster.net/u/Arnaud)\
**Post date:** [25. März 2026 um 09:22 UTC](https://ask.linuxmuster.net/t/bugreport-in-linuxmuster-api7-unter-python/12081/4 "2026-03-25T09:22:14Z")

</div>

Hallo,

Danke für die Meldung.  
Ich habe es in `lmntools` gelöst, noch nicht veröffentlicht. Dafür wird eine Änderung von dem Service nicht mehr nötig sein.

Gruß

Arnaud
