khal crashes while searching in interactive mode
Open
Nobody has claimed this yet.
type: duplicate
- Dominant language
- Python
- Stars
- 3.1k
- Forks
- 233
- Avg merge
- 1h 44m
- Merged PRs (30d)
- 1
Description
Describe the bug
When I press '/' to search for events in interactive mode, khal crashes
If applicable: Stack Trace
Traceback (most recent call last):
File "/usr/local/Cellar/khal/0.11.3/libexec/lib/python3.12/site-packages/khal/ui/__init__.py", line 1363, in start_pane
loop.run()
File "/usr/local/Cellar/khal/0.11.3/libexec/lib/python3.12/site-packages/urwid/event_loop/main_loop.py", line 343, in run
self._run()
File "/usr/local/Cellar/khal/0.11.3/libexec/lib/python3.12/site-packages/urwid/event_loop/main_loop.py", line 445, in _run
self.event_loop.run()
File "/usr/local/Cellar/khal/0.11.3/libexec/lib/python3.12/site-packages/urwid/event_loop/select_loop.py", line 182, in run
self._loop()
File "/usr/local/Cellar/khal/0.11.3/libexec/lib/python3.12/site-packages/urwid/event_loop/select_loop.py", line 229, in _loop
record.data()
File "/usr/local/Cellar/khal/0.11.3/libexec/lib/python3.12/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/local/Cellar/khal/0.11.3/libexec/lib/python3.12/site-packages/urwid/display/_raw_display_base.py", line 489, in parse_input
callback(decoded_codes, raw_codes)
File "/usr/local/Cellar/khal/0.11.3/libexec/lib/python3.12/site-packages/urwid/event_loop/main_loop.py", line 472, in _update
self.process_input(keys)
File "/usr/local/Cellar/khal/0.11.3/libexec/lib/python3.12/site-packages/urwid/event_loop/main_loop.py", line 572, in process_input
k = self._topmost_widget.keypress(self.screen_size, k) # noqa: PLW2901
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/khal/0.11.3/libexec/lib/python3.12/site-packages/urwid/widget/popup.py", line 140, in keypress
return self._current_widget.keypress(size, key)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/khal/0.11.3/libexec/lib/python3.12/site-packages/urwid/widget/frame.py", line 451, in keypress
return self.body.keypress((maxcol, remaining), key)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/khal/0.11.3/libexec/lib/python3.12/site-packages/khal/ui/__init__.py", line 1122, in keypress
self.search()
File "/usr/local/Cellar/khal/0.11.3/libexec/lib/python3.12/site-packages/khal/ui/__init__.py", line 1127, in search
overlay = urwid.Overlay(
^^^^^^^^^^^^^^
File "/usr/local/Cellar/khal/0.11.3/libexec/lib/python3.12/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/local/Cellar/khal/0.11.3/libexec/lib/python3.12/site-packages/urwid/widget/overlay.py", line 459, in set_overlay_parameters
self.options(
File "/usr/local/Cellar/khal/0.11.3/libexec/lib/python3.12/site-packages/urwid/widget/overlay.py", line 362, in options
VAlign(valign_type),
^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/python@3.12/3.12.3/Frameworks/Python.framework/Versions/3.12/lib/python3.12/enum.py", line 757, in __call__
return cls.__new__(cls, value)
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/python@3.12/3.12.3/Frameworks/Python.framework/Versions/3.12/lib/python3.12/enum.py", line 1171, in __new__
raise ve_exc
ValueError: <WHSettings.RELATIVE: 'relative'> is not a valid VAlign
To Reproduce
- khal interactive
- Press '/'
Expected behavior
- khal provides the user to start typing search string
OS, version, khal version and how you installed it:
-
khal, version 0.11.3
-
Installation method: brew
-
python version: 3.12
-
OS: MacOS Sonoma
-
The versions of your other python packages [e.g. the output of
pip freeze]
aiohttp==3.8.4
aiosignal==1.3.1
annotated-types==0.6.0
anyio==4.2.0
appdirs==1.4.4
async-timeout==4.0.2
asyncclick==8.1.3.4
attrs==23.1.0
boto3==1.28.64
botocore==1.31.64
Brotli @ file:///private/tmp/python-brotli-20231117-5715-qv008m/Brotli-1.1.0
certifi==2023.7.22
charset-normalizer==3.1.0
click==8.1.3
defusedxml==0.7.1
diagrams==0.23.3
dulwich==0.21.5
Flask==2.2.3
frozenlist==1.3.3
graphviz==0.20.1
gunicorn==21.0.1
icalendar==5.0.5
idna==3.4
importlib-metadata==6.8.0
itsdangerous==2.1.2
Jinja2==3.1.2
jmespath==1.0.1
kml2geojson==5.1.0
MarkupSafe==2.1.2
multidict==6.0.4
mutagen @ file:///private/tmp/python-mutagen-20231008-6107-91zfxm/mutagen-1.47.0
packaging==23.1
pathspec @ file:///private/tmp/python-pathspec-20231212-5149-sdd2ey/pathspec-0.12.1
platformdirs @ file:///private/tmp/python-platformdirs-20240131-5346-puime8/platformdirs-4.2.0
psutil @ file:///private/tmp/python-psutil-20240120-4912-5zd9yy/psutil-5.9.8
pycairo @ file:///private/tmp/py3cairo-20240213-6081-v7yhn5/pycairo-1.26.0
pycparser==2.22
pydantic==2.5.2
pydantic_core==2.14.5
pyee==8.2.2
PyGObject==3.48.2
pyppeteer==1.0.2
pyserial==3.5
python-dateutil==2.8.2
python-kasa==0.5.4
pytz==2023.3
pyudev==0.24.1
PyYAML @ file:///private/tmp/pyyaml-20231019-6134-1qsnlp0/PyYAML-6.0.1
requests @ file:///private/tmp/python-requests-20231124-5870-cua30x/requests-2.31.0
rshell==0.0.31
s3transfer==0.7.0
six==1.16.0
sniffio==1.3.0
tqdm==4.66.1
typed-ast==1.5.5
typing_extensions==4.9.0
urllib3==1.26.16
websockets==10.4
Werkzeug==2.2.3
xandikos==0.2.8
yarl==1.9.2
zipp==3.16.2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in khal/ui/init.py at the interactive keypress and search() entry points shown in the traceback. Run khal interactive and press / to reproduce the crash. Done means the search prompt opens without an exception and accepts a search string.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100