You are not logged in.

#1 2012-12-27 18:50:16

asd01
Member
Registered: 2010-12-19
Posts: 19

[SOLVED] Qtile: ImportError: cannot import name Key

I'm on a fresh Arch install trying to set up Qtile. Configuration file I'm using comes from

/usr/share/doc/qtile-git/examples/config

When I test it with

python2 ~/.config/qtile/config.py

I'm getting the following error:

Traceback (most recent call last)
File "/home/me/.config/qtile/config.py", line 7, in <module>
ImportError: cannot import name Key

Needless to say I can't even start Qtile. Any idea what may be wrong here?

Last edited by asd01 (2012-12-27 21:22:52)

Offline

#2 2012-12-27 21:22:14

asd01
Member
Registered: 2010-12-19
Posts: 19

Re: [SOLVED] Qtile: ImportError: cannot import name Key

Thanks to dx and cjbarnes18 from Qtile IRC I got it working. The newest release is breaking config.py. In short Group, Key, Screen, Drag, and Click has been moved to config. Old config:

from libqtile.manager import Key, Screen, Group, Drag, Click

New one:

from libqtile.config import Key, Screen, Group, Drag, Click

Offline

#3 2013-02-02 20:59:17

Dieter@be
Forum Fellow
From: Belgium
Registered: 2006-11-05
Posts: 1,970
Website

Re: [SOLVED] Qtile: ImportError: cannot import name Key

the inclusion of the config examples repo in this package is confusing. because that repo uses configs that are not necessarily in sync with the main repo.
the correct thing to do is copying the config from /usr/lib/python2.7/site-packages/libqtile/resources/default_config.py instead


< Daenyth> and he works prolifically
4 8 15 16 23 42

Offline

Board footer

Powered by FluxBB