Bug 1227196 - mygnuhealth fails on startup with "ModuleNotFoundError: No module named 'bleak'" in Tumbleweed container
Summary: mygnuhealth fails on startup with "ModuleNotFoundError: No module named 'blea...
Status: NEW
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Other (show other bugs)
Version: Current
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Axel Braun
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-29 09:27 UTC by Oliver Kurz
Modified: 2024-06-29 13:15 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Kurz 2024-06-29 09:27:49 UTC
## Observation
In a clean openSUSE Tumbleweed container I installed just mygnuhealth just to check if all necessary dependencies are provided and I found mygnuhealth eventually fails with "ModuleNotFoundError: No module named 'bleak'":

```
# mygnuhealth 
[WARNING] [Config      ] Older configuration version detected (0 instead of 27)
[WARNING] [Config      ] Upgrading configuration in progress.
[DEBUG  ] [Config      ] Upgrading from 0 to 1
[INFO   ] [Logger      ] Record log in /root/.kivy/logs/kivy_24-06-29_0.txt
[INFO   ] [Kivy        ] v2.3.0
[INFO   ] [Kivy        ] Installed at "/usr/lib64/python3.11/site-packages/kivy/__init__.py"
[INFO   ] [Python      ] v3.11.9 (main, Apr 08 2024, 06:18:15) [GCC]
[INFO   ] [Python      ] Interpreter at "/usr/bin/python3.11"
[INFO   ] [Logger      ] Purge log fired. Processing...
[INFO   ] [Logger      ] Purge finished!
[INFO   ] [Factory     ] 195 symbols loaded
[INFO   ] [Image       ] Providers: img_tex, img_dds, img_sdl2, img_pil (img_ffpyplayer ignored)
[INFO   ] [Text        ] Provider: sdl2(['text_pango'] ignored)
Initializing MyGNUHealth version 2.2.0
MyGNUHealth local config and db files wil go into dir: /root/.config/mygnuhealth
Initializing MyGNUHealth directory
Configuration file not found. Writing defaults
Verifying MyGNUHealth Database.....
DB file not found.
[INFO   ] [Window      ] Provider: sdl2
error: XDG_RUNTIME_DIR is invalid or not set in the environment.
[INFO   ] [GL          ] Using the "OpenGL" graphics system
[INFO   ] [GL          ] Backend used <sdl2>
[INFO   ] [GL          ] OpenGL version <b'4.5 (Compatibility Profile) Mesa 24.1.2'>
[INFO   ] [GL          ] OpenGL vendor <b'Mesa'>
[INFO   ] [GL          ] OpenGL renderer <b'llvmpipe (LLVM 18.1.6, 256 bits)'>
[INFO   ] [GL          ] OpenGL parsed version: 4, 5
[INFO   ] [GL          ] Shading version <b'4.50'>
[INFO   ] [GL          ] Texture max size <16384>
[INFO   ] [GL          ] Texture max units <32>
[INFO   ] [Window      ] auto add sdl2 input provider
[INFO   ] [Window      ] virtual keyboard not allowed, single mode, not docked
 Traceback (most recent call last):
   File "/usr/bin/mygnuhealth", line 5, in <module>
     from mygnuhealth import main
   File "/usr/lib/python3.11/site-packages/mygnuhealth/main.py", line 76, in <module>
     from mygnuhealth.bluetooth_settings import BluetoothSettings as bluetooth
   File "/usr/lib/python3.11/site-packages/mygnuhealth/bluetooth_settings.py", line 30, in <module>
     from bleak import BleakScanner
 ModuleNotFoundError: No module named 'bleak'
```

## Steps to reproduce
* Run `podman run --pull=newer --rm -it registry.opensuse.org/opensuse/tumbleweed sh -c 'zypper -n in mygnuhealth && mygnuhealth'`


## Expected result
mygnuhealth should fail with clear error messages (which might already show up) but should not fail with a not found module


## Suggestions
* Obviously there is no good realistic use case behind running mygnuhealth in a headless container but maybe this just needs simple fixing of package runtime dependencies
Comment 1 Oliver Kurz 2024-06-29 11:53:09 UTC
I could reproduce the same problem in an openQA test, created with https://github.com/os-autoinst/os-autoinst-distri-opensuse/pull/19626
https://openqa.opensuse.org/tests/4307747#step/mygnuhealth/15 shows the empty screen after a startup attempt. The error message is visible in https://openqa.opensuse.org/tests/4307747/file/mygnuhealth-journal.log
Comment 2 Axel Braun 2024-06-29 13:15:11 UTC
Thanks for the headup, I had installed it but not yet run....
python-bleak is packed in a home repo, I have asked the owner to submit it