Qtile Config Is Broken After An Update

Hi!

I’d really like to continue using qtile on my endeavouros system. I’m totally fine it not being supported anymore and understand why the decision was made. If I understand linux correctly, it should be possible to continue using qtile without having to switch to a different distro.

Here is what I tried to fix the issue:

  1. I went to the qtile config folder and all config files are there.
  2. I tried to fix this with another system update and noticed this, which I think might be related, but I don’t know how to fix it. “packages not in aur: eos-skel-ce-qtile”

What can I do to get qtile back working without having to switch distros?

Thank you :slight_smile:

If I remember right, qtile writes its log into ~/.local/share/qtile/qtile.log.

Can we see the autostart.ph(.py?) please.

Hello! I appreciate the replies. Here is the autostart.ph

#!/bin/sh
feh --bg-fill /home/jj/.config/qtile/darksouls.png
qbittorrent &
redshift-gtk &
#variety &
#shortwave &
#gpodder &
mercury-browser &
picom & disown # --experimental-backends --vsync should prevent screen tearing on most setups if needed

# Low battery notifier
~/.config/qtile/scripts/check_battery.sh & disown

#!/bin/sh
xrandr --output DP-1 --off --output HDMI-1 --off --output HDMI-2 --mode 1920x1080 --pos 0x0 --rotate normal

# Start welcome
#eos-welcome & disown

/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 & disown # start polkit agent from GNOME

Here is the qtile log!

2024-06-01 11:37:59,150 ERROR libqtile manager.py:load_config():L116 Configuration error:
Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/libqtile/core/manager.py", line 113, in load_config
    self.config.load()
  File "/usr/lib/python3.12/site-packages/libqtile/confreader.py", line 134, in load
    config = importlib.import_module(name)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 995, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/home/jj/.config/qtile/config.py", line 2, in <module>
    from modules.groups import groups
  File "/home/jj/.config/qtile/modules/groups.py", line 2, in <module>
    from libqtile.command import lazy
ImportError: cannot import name 'lazy' from 'libqtile.command' (/usr/lib/python3.12/site-packages/libqtile/command/__init__.py)
2024-06-01 11:37:59,151 WARNING libqtile utils.py:send_notification():L297 dbus-next is not installed. Unable to send notifications.
2024-06-01 11:38:18,108 WARNING libqtile lifecycle.py:_atexit():L37 Qtile will now terminate
2024-06-01 11:39:12,985 ERROR libqtile manager.py:load_config():L116 Configuration error:
Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/libqtile/core/manager.py", line 113, in load_config
    self.config.load()
  File "/usr/lib/python3.12/site-packages/libqtile/confreader.py", line 134, in load
    config = importlib.import_module(name)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 995, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/home/jj/.config/qtile/config.py", line 2, in <module>
    from modules.groups import groups
  File "/home/jj/.config/qtile/modules/groups.py", line 2, in <module>
    from libqtile.command import lazy
ImportError: cannot import name 'lazy' from 'libqtile.command' (/usr/lib/python3.12/site-packages/libqtile/command/__init__.py)
2024-06-01 11:39:12,986 WARNING libqtile utils.py:send_notification():L297 dbus-next is not installed. Unable to send notifications.
2024-06-01 11:41:39,703 ERROR libqtile manager.py:spawn():L1280 couldn't find `mercury`

Edit. I’m not sure if I expressed myself well enough.

Yesterday qtile worked fine. Yesterday I did the system update. Today when I turn on the computer qtile doesn’t work properly. When I did the update again, I saw this message, which I don’t remember seeing on previous updates: “packages not in aur: eos-skel-ce-qtile.” I also haven’t done any modifications to my qtile configuration for some time now.

eos-skel-ce-qtile message is a red herring, it is just a warning, that package just contains the old EnOS settings.

Are you running qtile-git?

Check your configs for an import lazy line - what does it say???

It should read:

from libqtile.lazy import lazy
2 Likes

I have dug up my old qtile config, which hasn’t been used for ages, mostly still works, but the volume widget crashes. Hmmmm :smiley:

TypeError: '<=' not supported between instances of 'tuple' and 'int'

on the line:

if self.volume <= 0:

Hello! Thank you for the reply.

I apologize. I’m not sure in which file the from libqtile.command… should be. Would you please tell me the file name?

This is my config.py file:

from modules.keys import keys, mod
from modules.groups import groups
from modules.layouts import layouts, floating_layout
from modules.mouse import mouse
from modules.hooks import *
import os
from modules.screens import screens
dgroups_key_binder = None
dgroups_app_rules = []  # type: List
main = None  # WARNING: this is deprecated and will be removed soon
follow_mouse_focus = True
bring_front_click = False
cursor_warp = False
auto_fullscreen = True
focus_on_window_activation = "smart"
wmname = "Qtile"
widget_defaults = dict(
        font='Cascadia Code',
        fontsize=24,
        padding=2
)

I’m using the qtile version that came with the endeavouros qtile version (it was one of the supported DEs some time ago). Sadly I don’t know if it’s qtile-git or something else. Is there a terminal command to find out what qtile version I have installed? :slight_smile:

Hey. Thank you :slight_smile:

Would you mind telling me in which file this line should be? I checked config.py and it’s not there.

Do you think that my volume widget is crashing my qtile?

Install:

1 extra/the_silver_searcher 2.2.0-3 (41.7 KiB 105.6 KiB) (Installed)

Then:

cd ~/.config/qtile
ag "libqtile.lazy" <<<<<<<libqtile.command here !!!!!!

This will give you ouptut like:

ag libqtile.lazy
modules/groups.py
2:from libqtile.lazy import lazy

modules/mouse.py
2:from libqtile.lazy import lazy

modules/keys.py
3:from libqtile.lazy import lazy
4:#from libqtile.lazy import lazy

libqtile.command not libqtile.lazy (sorry!!)

Apologies, am a bit distracted today, watching a rugby match on TV. No, your volume widget is fine, mine is broken (but haven’t used qtile in a long time, I recovered my config off a network drive).

Hi :slight_smile:

So to doublecheck before I possibly break anything further.

In the qtile folder I find all the mentions of the line:
libqtile.lazy

and then I replace libqtile.lazy everywhere with
libqtile.command?

No I am having issues with copy and paste. The command is:

ag libqtile.command

It will find all occurrences of that phrase in that directory and any directories below it.

Aha. But what do I do after I find all the occourances of that phrase? I’m honestly sorry for having to ask such newbie questions :slight_smile:

Sorry - edit file - change to from libqtile.lazy import lazy

Again apologies, been a busy day :smiley:

1 Like

Thank you so much for the help xircon! and omig!

Changing

from libqtile.command import lazy

to…

from libqtile.lazy import lazy

in groups.py fixed the issue!

Any idea what made my qtile break? I hadnt made any changes in qtile configuration in a long time. So whatever configuration I had, it worked and then after linux update it stopped working.

Enjoy the summer everyone :slight_smile:

2 Likes

I am glad you were able to get this fixed.

If you consider this as solved, go to xircon’s post that solved the issue and click on the
little box with the check mark inside. This will let the Discourse software know this topic is solved, which may help someone in the future with the same problem.

Pudge

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.