-
Notifications
You must be signed in to change notification settings - Fork 213
khal agenda --days=N <date>
fails in khal 0.3.1
#151
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
Comments
It works with the git version though. |
And yeah, it's been a while since the last release, but big things are planned for 0.4, see #147. |
I'm not a python guy, so I don't even understand what the error wants to tell me, ... I guess I will have problems installing it from git,... won't I? But yeah, looks good for 0.4! I'm looking forward to it! |
If you installed khal with pip, you can use the git version with:
|
$ khal agenda --days=20 01.02.2015
warning: unknown key or subsection "debug" in section "[default]"
Traceback (most recent call last):
File "/home/m/.local/bin/khal", line 9, in <module>
load_entry_point('khal===0.4.0.dev-146-g459751d', 'console_scripts', 'khal')()
File "/usr/lib/python2.7/site-packages/click/core.py", line 610, in __call__
return self.main(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/click/core.py", line 590, in main
rv = self.invoke(ctx)
File "/usr/lib/python2.7/site-packages/click/core.py", line 936, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/lib/python2.7/site-packages/click/core.py", line 782, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/lib/python2.7/site-packages/click/core.py", line 416, in invoke
return callback(*args, **kwargs)
File "/home/m/.local/lib/python2.7/site-packages/khal/cli.py", line 197, in agenda
events=events,
File "/home/m/.local/lib/python2.7/site-packages/khal/controllers.py", line 147, in __init__
show_all_days=show_all_days, **kwargs)
File "/home/m/.local/lib/python2.7/site-packages/khal/controllers.py", line 110, in get_agenda
desc = textwrap.wrap(event.compact(day), width)
File "/home/m/.local/lib/python2.7/site-packages/khal/khalendar/event.py", line 281, in compact
compact = self._compact_allday(day)
File "/home/m/.local/lib/python2.7/site-packages/khal/khalendar/event.py", line 294, in _compact_allday
'please supply a `day` this event is scheduled on')
ValueError: please supply a `day` this event is scheduled on $ khal --version
khal, version 0.4.0.dev-146-g459751d |
Hmm, what is your value for |
|
Could you try |
$ khal agenda --days=20 01.02.2015
Traceback (most recent call last):
File "/home/m/.local/bin/khal", line 9, in <module>
load_entry_point('khal===0.4.0.dev-147-g0760694', 'console_scripts', 'khal')()
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 519, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2630, in load_entry_point
return ep.load()
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2310, in load
return self.resolve()
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2316, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/home/m/.local/lib/python2.7/site-packages/khal/cli.py", line 33, in <module>
from khal import controllers
File "/home/m/.local/lib/python2.7/site-packages/khal/controllers.py", line 111
for event in itertools.chain(all_day_events, events)
^
SyntaxError: invalid syntax |
Argh, sorry, try again? |
$ khal agenda --days=20 01.02.2015
warning: unknown key or subsection "debug" in section "[default]"
Traceback (most recent call last):
File "/home/m/.local/bin/khal", line 9, in <module>
load_entry_point('khal===0.4.0.dev-148-g9d4a514', 'console_scripts', 'khal')()
File "/usr/lib/python2.7/site-packages/click/core.py", line 610, in __call__
return self.main(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/click/core.py", line 590, in main
rv = self.invoke(ctx)
File "/usr/lib/python2.7/site-packages/click/core.py", line 936, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/lib/python2.7/site-packages/click/core.py", line 782, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/lib/python2.7/site-packages/click/core.py", line 416, in invoke
return callback(*args, **kwargs)
File "/home/m/.local/lib/python2.7/site-packages/khal/cli.py", line 197, in agenda
events=events,
File "/home/m/.local/lib/python2.7/site-packages/khal/controllers.py", line 143, in __init__
show_all_days=show_all_days, **kwargs)
File "/home/m/.local/lib/python2.7/site-packages/khal/controllers.py", line 112, in get_agenda
desc = textwrap.wrap(event.compact(day), width)
File "/home/m/.local/lib/python2.7/site-packages/khal/khalendar/event.py", line 287, in compact
'"{self.href}": {e}'.format(self, str(e)))
KeyError: 'self' Unfortunately, I'm off now. Hope this gets fixed... but the current method of try-and-error is not really productive. Maybe you should setup everything and try it (I can provide my configuration, if you want), so we can speed up things a bit. |
I rather think a particular event in your calendars causes the trouble, and the added error message should make it clear which one it is. I am unable to trigger the error myself in any way, which is why I have to resort to trial-and-error. |
If you get back on this, I just pushed another commit fixing the latest error. |
$ khal agenda --days=20 01.02.2015 │ <<~ [0] [17:57]
warning: unknown key or subsection "debug" in section "[default]"
Traceback (most recent call last):
File "/home/m/.local/bin/khal", line 9, in <module>
load_entry_point('khal===0.4.0.dev-149-gce070ec', 'console_scripts', 'khal')()
File "/usr/lib/python2.7/site-packages/click/core.py", line 610, in __call__
return self.main(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/click/core.py", line 590, in main
rv = self.invoke(ctx)
File "/usr/lib/python2.7/site-packages/click/core.py", line 936, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/lib/python2.7/site-packages/click/core.py", line 782, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/lib/python2.7/site-packages/click/core.py", line 416, in invoke
return callback(*args, **kwargs)
File "/home/m/.local/lib/python2.7/site-packages/khal/cli.py", line 197, in agenda
events=events,
File "/home/m/.local/lib/python2.7/site-packages/khal/controllers.py", line 143, in __init__
show_all_days=show_all_days, **kwargs)
File "/home/m/.local/lib/python2.7/site-packages/khal/controllers.py", line 112, in get_agenda
desc = textwrap.wrap(event.compact(day), width)
File "/home/m/.local/lib/python2.7/site-packages/khal/khalendar/event.py", line 287, in compact
.format(self.href, str(e)))
RuntimeError: Something went wrong while displaying "[email protected]": please supply a `day` this event is scheduled on The mentioned event (which I can post without privacy concerns 😄 ) is:
looks like the line Edit: Maybe you should add something which skips entries which fail to get parsed and prints a warning for each (including filepath, maybe). |
It's supposed to work that way. This seems to be some sort of error that couldn't be catched at parse time. In this case, I think all-day events are supposed to have a DTEND that is ending on the next day. Is this thing displaying correctly in ownCloud? |
Hiho. Yes, as far as I can tell, everything shows up fine in ownCloud! |
I can reproduce this with any event where DTSTART == DTEND. @geier I think khal used to have a workaround for situations like this? |
Just re-checked the ownCloud entries. They were malformed. The end date was always one day before the start day for all-day events. So this issue is solved for me. Anyhow, the issue is still not solved ... because |
This should be fixed now. Khal now simply assumes the event to last one day if DTEND <= DTSTART |
So, this time I know everything on my side is allright:
The text was updated successfully, but these errors were encountered: