khal icon indicating copy to clipboard operation
khal copied to clipboard

Khal crashes after selecting description of event in right panel

Open ign1s-fatuus opened this issue 6 years ago • 5 comments

I am having an issue viewing the details of my events in the right column where the descriptions are. Each time I select the events and go to expand them by pressing Enter khal crashes. Here are the errors produced: warning: unknown key or subsection "color" in section "[default]" Traceback (most recent call last): File "/usr/lib/python3.7/site-packages/khal/ui/__init__.py", line 1300, in start_pane loop.run() File "/usr/lib/python3.7/site-packages/urwid/main_loop.py", line 286, in run self._run() File "/usr/lib/python3.7/site-packages/urwid/main_loop.py", line 384, in _run self.event_loop.run() File "/usr/lib/python3.7/site-packages/urwid/main_loop.py", line 788, in run self._loop() File "/usr/lib/python3.7/site-packages/urwid/main_loop.py", line 825, in _loop self._watch_files[fd]() File "/usr/lib/python3.7/site-packages/urwid/raw_display.py", line 404, in <lambda> event_loop, callback, self.get_available_raw_input()) File "/usr/lib/python3.7/site-packages/urwid/raw_display.py", line 502, in parse_input callback(processed, processed_codes) File "/usr/lib/python3.7/site-packages/urwid/main_loop.py", line 411, in _update self.process_input(keys) File "/usr/lib/python3.7/site-packages/urwid/main_loop.py", line 511, in process_input k = self._topmost_widget.keypress(self.screen_size, k) File "/usr/lib/python3.7/site-packages/urwid/wimp.py", line 648, in keypress return self._current_widget.keypress(size, key) File "/usr/lib/python3.7/site-packages/urwid/container.py", line 1131, in keypress return self.body.keypress( (maxcol, remaining), key ) File "/usr/lib/python3.7/site-packages/khal/ui/__init__.py", line 1106, in keypress return super().keypress(size, key) File "/usr/lib/python3.7/site-packages/khal/ui/base.py", line 82, in keypress return super().keypress(size, key) File "/usr/lib/python3.7/site-packages/khal/ui/widgets.py", line 308, in keypress key = super(NextMixin, self).keypress(size, key) File "/usr/lib/python3.7/site-packages/urwid/container.py", line 2271, in keypress key = w.keypress((mc,) + size[1:], key) File "/usr/lib/python3.7/site-packages/urwid/container.py", line 1590, in keypress key = self.focus.keypress(tsize, key) File "/usr/lib/python3.7/site-packages/urwid/container.py", line 2271, in keypress key = w.keypress((mc,) + size[1:], key) File "/usr/lib/python3.7/site-packages/khal/ui/__init__.py", line 925, in keypress self.view(self.focus_event.event) File "/usr/lib/python3.7/site-packages/khal/ui/__init__.py", line 640, in view (EventDisplay(self.pane._conf, event, collection=self.pane.collection), File "/usr/lib/python3.7/site-packages/khal/ui/__init__.py", line 954, in __init__ lines.append(urwid.Text('Categories: ' + event.categories)) TypeError: can only concatenate str (not "vCategory") to str I am currently syncing my calendars and todo lists from my nextcloud server via vdirsyncer. I have noticed that this only happens when I create new events with khal. I have tested this by creating and importing events from my server and have found that I can expand event data on only events originating from my server but not the other way around.

ign1s-fatuus avatar Dec 13 '18 00:12 ign1s-fatuus

OK, I figured this one out. It turns out that it really didn't like having both colors for each calendar block defined in the config file as well as having a color file in the calendar folder. I had originally setup khal on its own and didn' t realize that you could use the same color file as used by todoman. Once I commented out the colors in my config file and left the color files as they were things have done back to working as they were.

Looking at the docs it is not very clear how color is handled between the color file and the color variable in the config file. As it is worded it sounds like there is hierarchical order to the color definition were having both a color file and a color variable in the config file is possible:

If an individual calendar vdir has a color file, the calendar’s color will be set to the one specified in the color file, otherwise the color from the calendars subsection will be used.

ign1s-fatuus avatar Dec 14 '18 00:12 ign1s-fatuus

Thank you for reporting this bug, I'll have a look.

geier avatar Dec 17 '18 21:12 geier

I am also experiencing this problem for some events. It seems to occur for events with a category.

heiderich avatar Mar 12 '19 08:03 heiderich

I am also experiencing this problem for some events. It seems to occur for event with a category.

Recently experiencing the same for events without any category.

mkind avatar Feb 15 '21 11:02 mkind

I have this problem too, but only for events with categories.

jolars avatar Oct 17 '21 18:10 jolars

I can't reproduce this anymore on the latest master version, please re-open if this is still an issue for you.

geier avatar Oct 25 '23 12:10 geier