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
Crash when importing event with invalid VALARM/TRIGGER #1217
Comments
|
The issue with trying to return cal will be fixed with #1259 With that applied we get |
|
For the actual issue: I believe we can't do anything about this at khal at the moment, instead we could need to teach icalendar to accept somewhat broken icalendar files. |
|
closed as duplicate of #1264 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I tried importing this file, which is generated by NS International.
Khal crashed with the following error:
The issue seems to be this line in particular:
TRIGGER;RELATED=START:PT-2H. I recently wrote a parser for the icalendar duration type, and it also rejects this input. After looking at the spec closely, I found the issue; this should beTRIGGER;RELATED=START:-PT2H. Note that the-goes before the duration itself, and not before each part (otherwise we'd be able to have2H-3M, which is super quirky.Anyway, it's clear that this input has a technically invalid alarm, but I think we can do better and khal should be able to:
More into details:
The
cal_from_icsfunction tries toreturn caleven if it's never defined it. Note that theifmight be false, at which pointcalis never assigned.I don't think we need to parse alarms; if an alarm is invalid, we should ignore it and import it as-is. Khal doesn't deal with alarms anyway.
The text was updated successfully, but these errors were encountered: