Skip to content

Runtime error: TypeError: Label.__init__() got an unexpected keyword argument 'weight'. Did you mean 'height'? #14

@kohane27

Description

@kohane27

Hello! Hope you're doing well.

I was trying out wlrlui and got the following runtime error:

➜ wlrlui
Traceback (most recent call last):
  File "/nix/store/xqyfznz5550bjrppq2yb3jgsqlynsslm-wlr-layout-ui-1.6.16/bin/.wlrlui-wrapped", line 9, in <module>
    sys.exit(main())
             ~~~~^^
  File "/nix/store/xqyfznz5550bjrppq2yb3jgsqlynsslm-wlr-layout-ui-1.6.16/lib/python3.13/site-packages/wlr_layout_ui/__init__.py", line 102, in main
    pyglet.app.run()
    ~~~~~~~~~~~~~~^^
  File "/nix/store/2ddwbblvrahs7vnp9y155f7kk7nhpglz-python3.13-pyglet-2.0.10/lib/python3.13/site-packages/pyglet/app/__init__.py", line 76, in run
    event_loop.run(interval)
    ~~~~~~~~~~~~~~^^^^^^^^^^
  File "/nix/store/2ddwbblvrahs7vnp9y155f7kk7nhpglz-python3.13-pyglet-2.0.10/lib/python3.13/site-packages/pyglet/app/base.py", line 163, in run
    timeout = self.idle()
  File "/nix/store/2ddwbblvrahs7vnp9y155f7kk7nhpglz-python3.13-pyglet-2.0.10/lib/python3.13/site-packages/pyglet/app/base.py", line 224, in idle
    self.clock.call_scheduled_functions(dt)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^
  File "/nix/store/2ddwbblvrahs7vnp9y155f7kk7nhpglz-python3.13-pyglet-2.0.10/lib/python3.13/site-packages/pyglet/clock.py", line 217, in call_scheduled_functions
    item.func(now - item.last_ts, *item.args, **item.kwargs)
    ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/2ddwbblvrahs7vnp9y155f7kk7nhpglz-python3.13-pyglet-2.0.10/lib/python3.13/site-packages/pyglet/app/base.py", line 118, in _redraw_windows
    window.dispatch_event('on_draw')
    ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^
  File "/nix/store/2ddwbblvrahs7vnp9y155f7kk7nhpglz-python3.13-pyglet-2.0.10/lib/python3.13/site-packages/pyglet/window/__init__.py", line 671, in dispatch_event
    super().dispatch_event(*args)
    ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^
  File "/nix/store/2ddwbblvrahs7vnp9y155f7kk7nhpglz-python3.13-pyglet-2.0.10/lib/python3.13/site-packages/pyglet/event.py", line 394, in dispatch_event
    self._raise_dispatch_exception(event_type, args, getattr(self, event_type), exception)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/2ddwbblvrahs7vnp9y155f7kk7nhpglz-python3.13-pyglet-2.0.10/lib/python3.13/site-packages/pyglet/event.py", line 446, in _raise_dispatch_exception
    raise exception
  File "/nix/store/2ddwbblvrahs7vnp9y155f7kk7nhpglz-python3.13-pyglet-2.0.10/lib/python3.13/site-packages/pyglet/event.py", line 387, in dispatch_event
    if getattr(self, event_type)(*args):
       ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^
  File "/nix/store/xqyfznz5550bjrppq2yb3jgsqlynsslm-wlr-layout-ui-1.6.16/lib/python3.13/site-packages/wlr_layout_ui/gui.py", line 538, in on_draw
    self.draw_screens_and_widgets()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/nix/store/xqyfznz5550bjrppq2yb3jgsqlynsslm-wlr-layout-ui-1.6.16/lib/python3.13/site-packages/wlr_layout_ui/gui.py", line 524, in draw_screens_and_widgets
    w.draw(self.cursor_coords)
    ~~~~~~^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/xqyfznz5550bjrppq2yb3jgsqlynsslm-wlr-layout-ui-1.6.16/lib/python3.13/site-packages/wlr_layout_ui/displaywidget.py", line 143, in draw
    Label(
    ~~~~~^
        self.screen.uid,
        ^^^^^^^^^^^^^^^^
    ...<5 lines>...
        weight="bold" if self.screen.active else "normal",
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ).draw()
    ^
TypeError: Label.__init__() got an unexpected keyword argument 'weight'. Did you mean 'height'?

wlrlui version: 1.6.16

System info:

OS: NixOS 25.11 (Xantusia)
Kernel: 6.12.47
➜ hyprctl version
Hyprland 0.51.0 built from branch main at commit 46174f78b374b6cea669c48880877a8bdcf7802f  (version: bump to 0.51.0).
Date: 2025-09-10
Tag: v0.51.0, commits: 46174f78b374b6cea669c48880877a8bdcf7802f
built against:
 aquamarine 0.9.4
 hyprlang 0.6.3
 hyprutils 0.8.4
 hyprcursor 0.1.13
 hyprgraphics 0.1.5

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions