Bauh breakage after python 3.14 update

After the most recent stable update (01.02) and restarting Bauh no longer runs from the application or console.

Traceback (most recent call last):
  File "/usr/bin/bauh", line 5, in <module>
    from bauh.app import main
ModuleNotFoundError: No module named 'bauh'

After rebuilding the package, the error points towards an issue with the python version:

$ bauh
Traceback (most recent call last):
  File "/usr/bin/bauh", line 8, in <module>
    sys.exit(main())
             ~~~~^^
  File "/usr/lib/python3.14/site-packages/bauh/app.py", line 64, in main
    app, widget = new_manage_panel(args, app_config, logger)
                  ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.14/site-packages/bauh/manage.py", line 53, in new_manage_panel
    managers = gems.load_managers(context=context, locale=i18n.current_key, config=app_config,
                                  default_locale=DEFAULT_I18N_KEY, logger=logger)
  File "/usr/lib/python3.14/site-packages/bauh/view/core/gems.py", line 52, in load_managers
    loader = pkgutil.find_loader(f'bauh.gems.{f.name}.controller')
             ^^^^^^^^^^^^^^^^^^^
AttributeError: module 'pkgutil' has no attribute 'find_loader'

Right now the 2 easiest work-arounds seem to be:

  1. Run the AppImage
  2. Use the console command: pip install bauh

Any way to rectify this myself or do we need the actual application to get updated instead?

bauh is a custom recipe from AUR.

I suggest you rebuild the package.

If a rebuild doesn’t help it could be a missing dependency or it could be an oversight from the developers hand.

2 Likes

Thank you for the quick response.

I did try rebuilding as well, but the core issue, after doing more research, stems from the fact that pkgutil.find_loaderis now deprecated in python 3.14.
I can also confirm this isn’t a Manjaro issue as other Arch based distros have the same issue after the latest python update.

Another slightly “hack-y” solution can be found here as well.

Sadly, the project seems to be on hold and I don’t really know if a fix would be issued at all.
I suppose I’m writing this to let anyone else, who may be interested to know, the work-arounds, and that the project may not be maintained so alternatives need to be explored.

yes it’s this version

We can use uv

uv tool install bauh --python 3.14

bauh
Traceback (most recent call last):
  File "/home/patrick/.local/bin/bauh", line 10, in <module>
    sys.exit(main())
             ~~~~^^
  File "/home/patrick/.local/share/uv/tools/bauh/lib/python3.14/site-packages/bauh/app.py", line 64, in main
    app, widget = new_manage_panel(args, app_config, logger)
                  ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/patrick/.local/share/uv/tools/bauh/lib/python3.14/site-packages/bauh/manage.py", line 53, in new_manage_panel
    managers = gems.load_managers(context=context, locale=i18n.current_key, config=app_config,
                                  default_locale=DEFAULT_I18N_KEY, logger=logger)
  File "/home/patrick/.local/share/uv/tools/bauh/lib/python3.14/site-packages/bauh/view/core/gems.py", line 52, in load_managers
    loader = pkgutil.find_loader(f'bauh.gems.{f.name}.controller')
             ^^^^^^^^^^^^^^^^^^^
AttributeError: module 'pkgutil' has no attribute 'find_loader'

uv tool install bauh --python 3.13

now, no error , gui is ok

bauh
/home/patrick/.local/share/uv/tools/bauh/lib/python3.13/site-packages/bauh/gems/debian/index.py:143: SyntaxWarning: invalid escape sequence '\s'
  self._re_desktop_file_fields = re.compile('(Exec|TryExec|Icon|Categories|NoDisplay|Terminal)\s*=\s*(.+)')
/home/patrick/.local/share/uv/tools/bauh/lib/python3.13/site-packages/bauh/gems/flatpak/flatpak.py:19: SyntaxWarning: invalid escape sequence '\s'
  RE_REQUIRED_RUNTIME = re.compile(f'Required\s+runtime\s+.+\(([\w./]+)\)\s*.+\s+remote\s+([\w+./]+)')
/home/patrick/.local/share/uv/tools/bauh/lib/python3.13/site-packages/bauh/gems/arch/pacman.py:293: SyntaxWarning: invalid escape sequence '\s'
  for o in new_subprocess(['grep', '-Po', "Repository\s+:\s+\K.+"], stdin=info.stdout).stdout:
/home/patrick/.local/share/uv/tools/bauh/lib/python3.13/site-packages/bauh/gems/arch/pacman.py:346: SyntaxWarning: invalid escape sequence '\s'
  for out in new_subprocess(['grep', '-Po', 'Provides\s+:\s\K(.+)'], stdin=dep_info.stdout).stdout:
/home/patrick/.local/share/uv/tools/bauh/lib/python3.13/site-packages/bauh/gems/arch/pacman.py:375: SyntaxWarning: invalid escape sequence '\s'
  for out in new_subprocess(['grep', '-Po', 'Depends\s+On\s+:\s\K(.+)'], stdin=dep_info.stdout).stdout:

Already reported in both the AUR comments and upstream.