Skip to content

ikhal does not work with urwid 5.0.1 #1499

Done

Description

@duckunix

Describe the bug
did a pipx upgrade khal this week, and ikhal errors out with AttributeError: 'Text' object has no attribute 'w'

If applicable: Stack Trace

ikhal
Traceback (most recent call last):
  File "/home/don/.local/bin/ikhal", line 10, in <module>
    sys.exit(main_ikhal())
             ~~~~~~~~~~^^
  File "/home/don/.local/share/pipx/venvs/khal/lib/python3.14/site-packages/click/core.py", line 1631, in __call__
    return self.main(*args, **kwargs)
           ~~~~~~~~~^^^^^^^^^^^^^^^^^
  File "/home/don/.local/share/pipx/venvs/khal/lib/python3.14/site-packages/click/core.py", line 1552, in main
    rv = self.invoke(ctx)
  File "/home/don/.local/share/pipx/venvs/khal/lib/python3.14/site-packages/click/core.py", line 1415, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/don/.local/share/pipx/venvs/khal/lib/python3.14/site-packages/click/core.py", line 910, in invoke
    return callback(*args, **kwargs)
  File "/home/don/.local/share/pipx/venvs/khal/lib/python3.14/site-packages/click/decorators.py", line 34, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/don/.local/share/pipx/venvs/khal/lib/python3.14/site-packages/khal/cli.py", line 382, in interactive_cli
    controllers.interactive(
    ~~~~~~~~~~~~~~~~~~~~~~~^
        build_collection(
        ^^^^^^^^^^^^^^^^^
    ...<2 lines>...
        ctx.obj["conf"],
        ^^^^^^^^^^^^^^^^
    )
    ^
  File "/home/don/.local/share/pipx/venvs/khal/lib/python3.14/site-packages/khal/controllers.py", line 679, in interactive
    ui.start_pane(
    ~~~~~~~~~~~~~^
        pane,
        ^^^^^
    ...<2 lines>...
        quit_keys=conf["keybindings"]["quit"],
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/home/don/.local/share/pipx/venvs/khal/lib/python3.14/site-packages/khal/ui/__init__.py", line 1445, in start_pane
    frame = Window(
        footer=program_info + f" | {quit_keys[0]}: quit, ?: help",
        quit_keys=quit_keys,
    )
  File "/home/don/.local/share/pipx/venvs/khal/lib/python3.14/site-packages/khal/ui/base.py", line 171, in __init__
    self.update_header()
    ~~~~~~~~~~~~~~~~~~^^
  File "/home/don/.local/share/pipx/venvs/khal/lib/python3.14/site-packages/khal/ui/base.py", line 258, in update_header
    self.header.w.set_text(text[:-1] or "")
    ^^^^^^^^^^^^^
  File "/home/don/.local/share/pipx/venvs/khal/lib/python3.14/site-packages/urwid/widget/attr_wrap.py", line 132, in __getattr__
    return getattr(self._original_widget, name)
AttributeError: 'Text' object has no attribute 'w'

To Reproduce
pipx <install|upgrade> khal
ikhal

Expected behavior
ikhal to start normally

Screenshots

OS, version, khal version and how you installed it:

  • The output of khal --version: ikhal, version 0.14.1
  • pipx
  • python 3.14.8
  • OS nixos 26.11.20261030.1c89083 (amd64)

Additional context
After running:
pipx uninstall khal && pipx install --preinstall urwid==4.0.11 khal
ikhal works again.

Activity

  1. deprecated-dot commented on Nov 1, 2026

    @deprecated-dot

    I can reproduce this issue on my Gentoo setup; khal and urwid satisfied through portage. On dev-python/urwid-5.0.1 I get an identical error message:

    Traceback (most recent call last):
      File "/usr/lib/python-exec/python3.14/khal", line 8, in <module>
        sys.exit(main_khal())
                 ~~~~~~~~~^^
      File "/usr/lib/python3.14/site-packages/click/core.py", line 1631, in __call__
        return self.main(*args, **kwargs)
               ~~~~~~~~~^^^^^^^^^^^^^^^^^
      File "/usr/lib/python3.14/site-packages/click/core.py", line 1552, in main
        rv = self.invoke(ctx)
      File "/usr/lib/python3.14/site-packages/click/core.py", line 2032, in invoke
        return _process_result(sub_ctx.command.invoke(sub_ctx))
                               ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
      File "/usr/lib/python3.14/site-packages/click/core.py", line 1415, in invoke
        return ctx.invoke(self.callback, **ctx.params)
               ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/usr/lib/python3.14/site-packages/click/core.py", line 910, in invoke
        return callback(*args, **kwargs)
      File "/usr/lib/python3.14/site-packages/click/decorators.py", line 34, in new_func
        return f(get_current_context(), *args, **kwargs)
      File "/usr/lib/python3.14/site-packages/khal/cli.py", line 364, in interactive
        controllers.interactive(
        ~~~~~~~~~~~~~~~~~~~~~~~^
            build_collection(
            ^^^^^^^^^^^^^^^^^
        ...<2 lines>...
            ctx.obj["conf"],
            ^^^^^^^^^^^^^^^^
        )
        ^
      File "/usr/lib/python3.14/site-packages/khal/controllers.py", line 676, in interactive
        ui.start_pane(
        ~~~~~~~~~~~~~^
            pane,
            ^^^^^
        ...<2 lines>...
            quit_keys=conf["keybindings"]["quit"],
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        )
        ^
      File "/usr/lib/python3.14/site-packages/khal/ui/__init__.py", line 1445, in start_pane
        frame = Window(
            footer=program_info + f" | {quit_keys[0]}: quit, ?: help",
            quit_keys=quit_keys,
        )
      File "/usr/lib/python3.14/site-packages/khal/ui/base.py", line 171, in __init__
        self.update_header()
        ~~~~~~~~~~~~~~~~~~^^
      File "/usr/lib/python3.14/site-packages/khal/ui/base.py", line 258, in update_header
        self.header.w.set_text(text[:-1] or "")
        ^^^^^^^^^^^^^
      File "/usr/lib/python3.14/site-packages/urwid/widget/attr_wrap.py", line 132, in __getattr__
        return getattr(self._original_widget, name)
    AttributeError: 'Text' object has no attribute 'w'
    

    Masking urwid 5.0.1 and installing the previous stabilized version available in the Gentoo tree, 4.2.3, khal launches normally.

    Environment:

    • Gentoo Linux
    • Python 3.14.10
    • khal 0.14.0, installed via portage
  2. rmmonster commented on Nov 12, 2026

    @rmmonster

    installations via uv tool install khal are also affected.
    workaround uv tool install khal@latest --with 'urwid<5'.

    so changing

    dependencies = [
        "click>=3.2",
        "click_log>=0.2.0",
        "icalendar>=6.0.0,<8.0.0",
        "urwid>=2.6.15",
        "pyxdg",
        "pytz",
        "python-dateutil",
        "configobj",
        "tzlocal>=1.0",
    ]
    

    to

    dependencies = [
        "click>=3.2",
        "click_log>=0.2.0",
        "icalendar>=6.0.0,<8.0.0",
        "urwid>=2.6.15,<5.0.0",
        "pyxdg",
        "pytz",
        "python-dateutil",
        "configobj",
        "tzlocal>=1.0",
    ]
    

    should probably resolve this.

  3. geier commented on Nov 26, 2026

    @geier
    Member

    thanks for reporting, fixed with #1491

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions