tobi-wan-kenobi / bumblebee-status

bumblebee-status is a modular, theme-able status line generator for the i3 window manager.
https://bumblebee-status.readthedocs.io/en/main/
MIT License
1.2k stars 229 forks source link

Loading custom modules fails with 'importlib' has no attribute 'util' #962

Closed wngrtn closed 1 year ago

wngrtn commented 1 year ago

Affected module: custom modules

Description:

Loading any custom module fails with AttributeError: module 'importlib' has no attribute 'util'.

I am on python 3.11.3 and, apparently, importlib no longer exports util (see corresponding thread on discuss.python.org).

The fix is probably as easy as adding import importlib.util in core/module.py but my python experience is very limited and I am not sure how to test and build the project.

tobi-wan-kenobi commented 1 year ago

Thanks a lot! Will look into this right away.

One question: What do you mean by "custom module"?

wngrtn commented 1 year ago

Thanks! Ah, custom module = module placed in ~/.config/bumblebee-status/modules.

I was looking into writing a custom module, copied the Hello World example to ~/.config/bumblebee-status/modules/helloworld.py, and tried to run it with bumblebee-status -m helloworld.