pimutils / khal

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

ikhal Crashes when attempting to edit an Event #1186

Open BioBox opened 2 years ago

BioBox commented 2 years ago

When I try to navigate down past the start/end datetimes I get this:

Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/khal/ui/__init__.py", line 1365, in start_pane
    loop.run()
  File "/usr/lib/python3.10/site-packages/urwid/main_loop.py", line 287, in run
    self._run()
  File "/usr/lib/python3.10/site-packages/urwid/main_loop.py", line 385, in _run
    self.event_loop.run()
  File "/usr/lib/python3.10/site-packages/urwid/main_loop.py", line 790, in run
    self._loop()
  File "/usr/lib/python3.10/site-packages/urwid/main_loop.py", line 827, in _loop
    self._watch_files[fd]()
  File "/usr/lib/python3.10/site-packages/urwid/raw_display.py", line 416, in <lambda>
    wrapper = lambda: self.parse_input(
  File "/usr/lib/python3.10/site-packages/urwid/raw_display.py", line 515, in parse_input
    callback(processed, processed_codes)
  File "/usr/lib/python3.10/site-packages/urwid/main_loop.py", line 412, in _update
    self.process_input(keys)
  File "/usr/lib/python3.10/site-packages/urwid/main_loop.py", line 513, in process_input
    k = self._topmost_widget.keypress(self.screen_size, k)
  File "/usr/lib/python3.10/site-packages/urwid/wimp.py", line 651, in keypress
    return self._current_widget.keypress(size, key)
  File "/usr/lib/python3.10/site-packages/urwid/container.py", line 1135, in keypress
    return self.body.keypress( (maxcol, remaining), key )
  File "/usr/lib/python3.10/site-packages/urwid/container.py", line 2316, in keypress
    key = w.keypress((mc,) + size[1:], key)
  File "/usr/lib/python3.10/site-packages/khal/ui/editor.py", line 544, in keypress
    return super().keypress(size, key)
  File "/usr/lib/python3.10/site-packages/khal/ui/widgets.py", line 376, in keypress
    key = super().keypress(size, key)
  File "/usr/lib/python3.10/site-packages/urwid/listbox.py", line 968, in keypress
    key = focus_widget.keypress((maxcol,),key)
  File "/usr/lib/python3.10/site-packages/urwid/container.py", line 2316, in keypress
    key = w.keypress((mc,) + size[1:], key)
  File "/usr/lib/python3.10/site-packages/urwid/wimp.py", line 543, in keypress
    self._emit('click')
  File "/usr/lib/python3.10/site-packages/urwid/widget.py", line 461, in _emit
    signals.emit_signal(self, name, self, *args)
  File "/usr/lib/python3.10/site-packages/urwid/signals.py", line 265, in emit
    result |= self._call_callback(callback, user_arg, user_args, args)
  File "/usr/lib/python3.10/site-packages/urwid/signals.py", line 295, in _call_callback
    return bool(callback(*args_to_pass))
  File "/usr/lib/python3.10/site-packages/khal/ui/editor.py", line 524, in save
    self.collection.update(self.event)
  File "/usr/lib/python3.10/site-packages/khal/khalendar/khalendar.py", line 174, in update
    event.etag = self._storages[event.calendar].update(event.href, event, event.etag)
  File "/usr/lib/python3.10/site-packages/khal/khalendar/vdir.py", line 250, in update
    if not isinstance(item.raw, str):
  File "/usr/lib/python3.10/site-packages/khal/khalendar/event.py", line 382, in raw
    timezone = create_timezone(tzinfo, self.start)
  File "/usr/lib/python3.10/site-packages/khal/khalendar/event.py", line 937, in create_timezone
    tz.fromutc(tz._utc_transition_times[num]).replace(tzinfo=None))
  File "/usr/lib/python3.10/site-packages/pytz/tzinfo.py", line 201, in fromutc
    return (dt + inf[0]).replace(tzinfo=self._tzinfos[inf])
OverflowError: date value out of range
BioBox commented 2 years ago

Okay so the program freezes for a while when I get to the time field, but I am able to edit it. However when I try to save I get the error shown above.

mschilli87 commented 2 years ago

Is this with khal version <= 0.10.4? Could be https://github.com/pimutils/khal/issues/1092 which is already fixed in 0.10.5.

BioBox commented 2 years ago

No I'm using 0.10.5.

geier commented 1 year ago

Thank you for reporting this! Can you give some more details on how to reproduce this? I'm currently unable to reproduce this.