Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't add an event in ikhal #1329

Closed
mokas01 opened this issue Jan 17, 2024 · 3 comments
Closed

can't add an event in ikhal #1329

mokas01 opened this issue Jan 17, 2024 · 3 comments

Comments

@mokas01
Copy link

mokas01 commented Jan 17, 2024

Hi,

I have an issue of ikhal crashing when adding an event

Describe the bug

On debian 12, with Python 3.11.2 and Khard version 0.19.1.
When using ikhal, i can navigate through the existing events, but when I want to add one, it just crashes

If applicable: Stack Trace

Traceback (most recent call last):
  File "/home/v/.local/lib/python3.11/site-packages/khal/ui/__init__.py", line 1363, in start_pane
    loop.run()
  File "/home/v/.local/lib/python3.11/site-packages/urwid/event_loop/main_loop.py", line 339, in run
    self._run()
  File "/home/v/.local/lib/python3.11/site-packages/urwid/event_loop/main_loop.py", line 441, in _run
    self.event_loop.run()
  File "/home/v/.local/lib/python3.11/site-packages/urwid/event_loop/select_loop.py", line 182, in run
    self._loop()
  File "/home/v/.local/lib/python3.11/site-packages/urwid/event_loop/select_loop.py", line 218, in _loop
    self._entering_idle()
  File "/home/v/.local/lib/python3.11/site-packages/urwid/event_loop/select_loop.py", line 171, in _entering_idle
    callback()
  File "/home/v/.local/lib/python3.11/site-packages/urwid/event_loop/main_loop.py", line 648, in entering_idle
    self.draw_screen()
  File "/home/v/.local/lib/python3.11/site-packages/urwid/event_loop/main_loop.py", line 665, in draw_screen
    canvas = self._topmost_widget.render(self.screen_size, focus=True)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/v/.local/lib/python3.11/site-packages/urwid/widget/widget.py", line 112, in cached_render
    canv = fn(self, size, focus=focus)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/v/.local/lib/python3.11/site-packages/urwid/widget/popup.py", line 116, in render
    self._update_overlay(size, focus)
  File "/home/v/.local/lib/python3.11/site-packages/urwid/widget/popup.py", line 89, in _update_overlay
    canv = self._original_widget.render(size, focus=focus)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/v/.local/lib/python3.11/site-packages/urwid/widget/widget.py", line 112, in cached_render
    canv = fn(self, size, focus=focus)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/v/.local/lib/python3.11/site-packages/urwid/widget/frame.py", line 594, in render
    body = self.body.render((maxcol, maxrow - ftrim - htrim), focus and self.focus_part == "body")
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/v/.local/lib/python3.11/site-packages/urwid/widget/widget.py", line 112, in cached_render
    canv = fn(self, size, focus=focus)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/v/.local/lib/python3.11/site-packages/urwid/widget/columns.py", line 903, in render
    w.render(w_size, focus=focus and self.focus_position == i),
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/v/.local/lib/python3.11/site-packages/urwid/widget/widget.py", line 112, in cached_render
    canv = fn(self, size, focus=focus)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/v/.local/lib/python3.11/site-packages/urwid/widget/widget.py", line 780, in render
    canv = get_delegate(self).render(size, focus=focus)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/v/.local/lib/python3.11/site-packages/urwid/widget/widget.py", line 112, in cached_render
    canv = fn(self, size, focus=focus)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/v/.local/lib/python3.11/site-packages/urwid/widget/widget.py", line 780, in render
    canv = get_delegate(self).render(size, focus=focus)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/v/.local/lib/python3.11/site-packages/urwid/widget/widget.py", line 112, in cached_render
    canv = fn(self, size, focus=focus)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/v/.local/lib/python3.11/site-packages/urwid/listbox.py", line 554, in render
    canvas = widget.render((maxcol,))
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/v/.local/lib/python3.11/site-packages/urwid/widget/widget.py", line 112, in cached_render
    canv = fn(self, size, focus=focus)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/v/.local/lib/python3.11/site-packages/urwid/widget/widget.py", line 780, in render
    canv = get_delegate(self).render(size, focus=focus)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/v/.local/lib/python3.11/site-packages/urwid/widget/widget.py", line 112, in cached_render
    canv = fn(self, size, focus=focus)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/v/.local/lib/python3.11/site-packages/urwid/widget/pile.py", line 794, in render
    canv = w.render(w_size, focus=focus and item_focus)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/v/.local/lib/python3.11/site-packages/urwid/widget/widget.py", line 112, in cached_render
    canv = fn(self, size, focus=focus)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/v/.local/lib/python3.11/site-packages/urwid/widget/columns.py", line 903, in render
    w.render(w_size, focus=focus and self.focus_position == i),
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/v/.local/lib/python3.11/site-packages/urwid/widget/widget.py", line 112, in cached_render
    canv = fn(self, size, focus=focus)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/v/.local/lib/python3.11/site-packages/urwid/widget/widget.py", line 780, in render
    canv = get_delegate(self).render(size, focus=focus)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/v/.local/lib/python3.11/site-packages/urwid/widget/widget.py", line 113, in cached_render
    validate_size(self, size, canv)
  File "/home/v/.local/lib/python3.11/site-packages/urwid/widget/widget.py", line 92, in validate_size
    raise WidgetError(
urwid.widget.widget.WidgetError: Widget <Padding selectable fixed/flow widget <CalendarPopUp selectable flow widget <ValidatedEdit selectable flow widget>> right=1 width=11> rendered (11 x 1) canvas when passed size (10,)!

Expected behavior
A clear and concise description of what you expected to happen.

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

  • The output of khal --version: Khard version 0.19.1
  • Installation method : pip3
  • python version Python 3.11.2
  • OS : Debian 12
  • Your khal config file
  • pip freeze :
aiohttp==3.8.4
aiosignal==1.3.1
aiostream==0.4.3
async-timeout==4.0.2
atomicwrites==1.4.1
attrs==22.2.0
blinker==1.5
Brlapi==0.8.4
certifi==2022.9.24
chardet==5.1.0
charset-normalizer==3.0.1
click==8.1.7
click-log==0.4.0
colorama==0.4.6
configobj==5.0.8
cryptography==38.0.4
cupshelpers==1.0
dbus-python==1.3.2
distro==1.8.0
distro-info==1.5+deb12u1
frozenlist==1.3.3
httplib2==0.20.4
icalendar==5.0.11
idna==3.3
imaplib2==3.5
khal==0.11.2
khard==0.19.1
lazr.restfulclient==0.14.5
lazr.uri==1.0.6
louis==3.24.0
Mako==1.2.4.dev0
MarkupSafe==2.1.2
multidict==6.0.4
oauthlib==3.2.2
pycairo==1.20.1
pycups==2.0.1
pycurl==7.45.2
PyGObject==3.42.2
PyJWT==2.6.0
pyparsing==3.0.9
PySimpleSOAP==1.16.2
pysmbc==1.0.23
python-apt==2.6.0
python-dateutil==2.8.2
python-debian==0.1.49
python-debianbts==4.0.1
pytz==2023.3.post1
pyxdg==0.28
reportbug==12.0.0
requests==2.28.1
requests-toolbelt==0.10.1
rfc6555==0.1.0
ruamel.yaml==0.18.5
ruamel.yaml.clib==0.2.8
six==1.16.0
tzlocal==5.2
Unidecode==1.3.8
urllib3==1.26.12
urwid==2.4.2
vdirsyncer==0.19.0
vobject==0.9.6.1
wadllib==1.3.6
xdg==5
yarl==1.8.2

Thanks for the software and your help !

@geier
Copy link
Member

geier commented Jan 17, 2024

Thank you for reporting this bug. I believe this is due to urwid 2.4.2, if you downgrade to 2.4.1 this should fix the issue. Or manually apply this patch: #1328

@aereaux
Copy link

aereaux commented Feb 6, 2024

Thanks, this patch fixes the issue for me. Would it be possible to get a release that includes it soon?

@geier
Copy link
Member

geier commented Feb 12, 2024

should be fixed in master and in v0.11.3

@geier geier closed this as completed Feb 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants