pimutils / khal

:calendar: CLI calendar application
https://lostpackets.de/khal/
MIT License
2.54k stars 197 forks source link

Ikhal crashes when searching for events #1339

Closed d4rios closed 4 months ago

d4rios commented 4 months ago

Describe the bug Ikhal crashes when searching for events

If applicable: Stack Trace

❯ ikhal Traceback (most recent call last): File "/usr/lib/python3.11/site-packages/khal/ui/init.py", line 1363, in start_pane loop.run() File "/usr/lib/python3.11/site-packages/urwid/event_loop/main_loop.py", line 343, in run self._run() File "/usr/lib/python3.11/site-packages/urwid/event_loop/main_loop.py", line 445, in _run self.event_loop.run() File "/usr/lib/python3.11/site-packages/urwid/event_loop/select_loop.py", line 182, in run self._loop() File "/usr/lib/python3.11/site-packages/urwid/event_loop/select_loop.py", line 229, in _loop record.data() File "/usr/lib/python3.11/site-packages/urwid/display/_posix_raw_display.py", line 274, in wrapper return self.parse_input(event_loop, callback, self.get_available_raw_input()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/urwid/display/_raw_display_base.py", line 490, in parse_input callback(decoded_codes, raw_codes) File "/usr/lib/python3.11/site-packages/urwid/event_loop/main_loop.py", line 472, in _update self.process_input(keys) File "/usr/lib/python3.11/site-packages/urwid/event_loop/main_loop.py", line 573, in process_input k = self._topmost_widget.keypress(self.screen_size, k) # noqa: PLW2901 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/urwid/widget/popup.py", line 131, in keypress return self._current_widget.keypress(size, key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/urwid/widget/frame.py", line 449, in keypress return self.body.keypress((maxcol, remaining), key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/khal/ui/init.py", line 1122, in keypress self.search() File "/usr/lib/python3.11/site-packages/khal/ui/init.py", line 1127, in search overlay = urwid.Overlay( ^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/urwid/widget/overlay.py", line 166, in init self.set_overlay_parameters(align, width, valign, height, min_width, min_height, left, right, top, bottom) File "/usr/lib/python3.11/site-packages/urwid/widget/overlay.py", line 459, in set_overlay_parameters self.options( File "/usr/lib/python3.11/site-packages/urwid/widget/overlay.py", line 362, in options VAlign(valign_type), ^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/enum.py", line 712, in call return cls.new(cls, value) ^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/enum.py", line 1135, in new raise ve_exc ValueError: <WHSettings.RELATIVE: 'relative'> is not a valid VAlign

To Reproduce I run ikhal from my terminal (alacritty) and press the / key to search for an event.

Expected behavior Ikhal should show me the events found

Screenshots If applicable, add screenshots to help explain your problem.

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

[[Casa]] path = ~/.calendars/6C43D0F9-7DE6-4D08-BE77-5A8FC3C30429 type = discover color = light red

[[Personal]] path = ~/.calendars/D411412F-AA58-4602-8D3B-4C9AC6FBE4C5 type = discover color = light green

[[Trabajo]] path = ~/.calendars/154B5BEC-34AF-43A8-B23B-1D171FFE8A5F type = discover color = dark blue

[[Planning]] path = ~/.calendars/A462C994-F46D-4AF9-8EE0-120104BD5D67 type = discover color = light cyan

[locale] firstweekday = 0 timeformat = %H:%M dateformat = %d/%m/%Y longdateformat = %d/%m/%Y datetimeformat = %d/%m/%Y %H:%M longdatetimeformat = %d/%m/%Y %H:%M

[default] default_calendar = D411412F-AA58-4602-8D3B-4C9AC6FBE4C5 highlight_event_days = True

[highlight_days] color = light magenta method = fg

[view] dynamic_days = True frame = color

mb720 commented 4 months ago

Workaround: revert to python-urwid version 2.4.1.

geier commented 4 months ago

This looks like the same issue as https://github.com/pimutils/khal/issues/1340, it's fixed with urwid 2.6.8

geier commented 4 months ago

I'll close this in favor of #1340, perhaps we'll implement a workaround for the urwid versions we have an issue with.