question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to spawn extension.WindowList

See original GitHub issue

Issue description

When I try to launch the WindowList extension it fails and I get an error.

Qtile version

0.18.1

Stack traces

and the stacktrace:

2021-09-30 18:33:24,691 ERROR libqtile manager.py:process_key_event():L361 KB command error run_extension: Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/libqtile/command/interface.py", line 313, in call
    return SUCCESS, cmd(*args, **kwargs)
  File "/usr/lib/python3.9/site-packages/libqtile/core/manager.py", line 1525, in cmd_run_extension
    extension.run()
  File "/usr/lib/python3.9/site-packages/libqtile/extension/window_list.py", line 58, in run
    out = super().run(items=self.item_to_win.keys())
  File "/usr/lib/python3.9/site-packages/libqtile/extension/dmenu.py", line 96, in run
    proc = super().run()
  File "/usr/lib/python3.9/site-packages/libqtile/extension/base.py", line 99, in run
    return Popen(self.configured_command, stdout=PIPE, stdin=PIPE)
  File "/usr/lib/python3.9/subprocess.py", line 951, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.9/subprocess.py", line 1754, in _execute_child
    self.pid = _posixsubprocess.fork_exec(
TypeError: expected str, bytes or os.PathLike object, not list

Configuration

The config is:

from libqtile import extension
from libqtile.lazy import lazy

keys.append(
        Key([mod], "semicolon",
            lazy.run_extension(extension.WindowList(
                dmenu_prompt = 'Switch to:',
                dmenu_command = '/usr/bin/dmenu',
    ))))

My dmenu supports the height / -h option.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:22 (12 by maintainers)

github_iconTop GitHub Comments

2reactions
elParaguayocommented, Oct 16, 2021

Cool. Yes, that’s the problem.

This isn’t the same as bar colours which can be a gradient. This is a value which gets passed to dmenu so qtile isn’t responsible for drawing it.

1reaction
mitchdostcommented, Oct 16, 2021

Thank you! this is now working

        lazy.run_extension(WindowList(
            dmenu_prompt = 'Switch to:',
            dmenu_command = 'dmenu',
            background= '#555555',
            foreground='#DBDBDB')
        ),

had the same idea when looking at the log output. But the problem is inherited from the colors List in config.py because this list implicitely referenced inside Dmenu class by self.background and self.foreground.

colors = [["#555555", "#555555"],  # panel background
          ["#434758", "#434758"],  # background for current screen tab
          ["#DBDBDB", "#DBDBDB"],  # font color for group names
          ["#ff5555", "#ff5555"],  # background color for layout widget
          ["#8BB158", "#8BB158"],  # dark green gradiant for other screen tabs
          ["#7197E7", "#7197E7"]]  # background color for pacman widget

Not sure that’s right, presumably you set foreground=colors[0] in your config. If so, you’ve passed a list. You should have passed colors[0][0].

No default colours are passed to the extension and there’s no “implicit” reference either.

here is the problem. When I wrote that code, I thought that foreground and background can be color gradients.

widget_defaults = dict(
        font="Ubuntu",
        fontsize=font_scale(13),
        icon_size=font_scale(20),
        padding=font_scale(5),
        linewidth=font_scale(1),
        foreground=colors[2],
        background=colors[0]
        )
extension_defaults = widget_defaults.copy()

again, thank you for your help.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Qtile doesn't spawn dmenu · Issue #1931 - GitHub
Issue description Qtile doesn't spawn dmenu even after installing everything required. I have tried running dmenu_run in the terminal and it ...
Read more >
Fix Spawn extension (from_trunk_GMSC, 206, 1) exited non ...
Dear, I have connect SIP with telco and i have proplem: Show sip pees is OK but when dail shortcode 206 then have...
Read more >
2026622 – gnome-shell Error connecting to Nautilus
Just a note that the desktop-icons extension doesn't work with GNOME 40+, so can't be tested with recent Fedoras, but the dbus-send reproducer...
Read more >
Spawn extension - FreePBX Community Forums
Hello i got a new message in asterisk -rvvv when i was monitoring it said == Spawn extension (from-sip-external, h, 1) exited non-zero...
Read more >
Gnome Shell keeps crashing / Applications & Desktop ...
No, it is not creating core dump. It always crash when I'm trying to open project with pycharm. It is only problematic on...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found