Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What qtile version is supported? #10

Closed
nazar-pc opened this issue Mar 1, 2018 · 5 comments
Closed

What qtile version is supported? #10

nazar-pc opened this issue Mar 1, 2018 · 5 comments
Labels

Comments

@nazar-pc
Copy link

nazar-pc commented Mar 1, 2018

I'm getting following error both with 0.10.7 and recently released 0.11.0:

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/nazar-pc/.local/lib/python3.6/site-packages/plasma/layout.py", line 64, in add
    self.root.restore(new)
  File "/home/nazar-pc/.local/lib/python3.6/site-packages/plasma/node.py", line 560, in restore
    raise NotRestorableError()
plasma.node.NotRestorableError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/nazar-pc/.local/bin/qtile", line 11, in <module>
    load_entry_point('qtile', 'console_scripts', 'qtile')()
  File "/web/github/qtile/libqtile/scripts/qtile.py", line 125, in main
    q = make_qtile()
  File "/web/github/qtile/libqtile/scripts/qtile.py", line 119, in make_qtile
    state=options.state,
  File "/web/github/qtile/libqtile/manager.py", line 245, in __init__
    self.scan()
  File "/web/github/qtile/libqtile/manager.py", line 568, in scan
    self.manage(item)
  File "/web/github/qtile/libqtile/manager.py", line 627, in manage
    c = window.Window(w, self)
  File "/web/github/qtile/libqtile/window.py", line 770, in __init__
    group.add(self)
  File "/web/github/qtile/libqtile/group.py", line 270, in add
    i.add(win)
  File "/home/nazar-pc/.local/lib/python3.6/site-packages/plasma/layout.py", line 66, in add
    node.add_node(new, self.add_mode)
  File "/home/nazar-pc/.local/lib/python3.6/site-packages/plasma/node.py", line 539, in add_node
    self.parent.add_child_after(node, self)
  File "/home/nazar-pc/.local/lib/python3.6/site-packages/plasma/node.py", line 498, in add_child_after
    self.add_child(new, idx=old.index+1)
  File "/home/nazar-pc/.local/lib/python3.6/site-packages/plasma/node.py", line 495, in add_child
    Node.fit_into(node.siblings, total - (total / len(self)))
TypeError: unsupported operand type(s) for /: 'NoneType' and 'int'
@numirias numirias added the bug label Mar 1, 2018
@numirias
Copy link
Owner

numirias commented Mar 1, 2018

Thanks for reporting!

I think I found a way to reproduce the bug. Will let you know when I got it fixed.

@numirias
Copy link
Owner

numirias commented Mar 1, 2018

The bug was triggered when windows were added to the layout but the layout's configure() had not yet been called. In that case the screen dimensions were still unknown to the layout and it tried to do math with None values.

Do you mind checking if the patch fixes the problem for you?

@flacjacket
Copy link

flacjacket commented Mar 1, 2018 via email

@numirias
Copy link
Owner

numirias commented Mar 1, 2018

@flacjacket I first thought so, too. But there are legitimate cases where it can happen:

If you have set multiple layouts in your config, say layouts = [VerticalTile(), Plasma()], every time you spawn a new window, the add() method is called on all layouts, even the inactive ones. But configure() is only called on the active one. So the inactive layouts don't know the screen dimensions until they become active.

@nazar-pc
Copy link
Author

nazar-pc commented Mar 1, 2018

#11 works for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants