You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've downloaded a ics-file from the internet and read it with icalender. Then I want to extract just an event from that file and process it further.
Unfortunalety, icalendar doesn't transform the information back to ics, as an exception occures there
2021-10-23 12:00:00+00:00
2021-10-23 16:00:00+00:00
Traceback (most recent call last):
File "/home/martin/dev/python_parkclub-calendar-scraper/minimal.py", line 17, in<module>print(event.to_ical())
File "/home/martin/.local/lib/python3.9/site-packages/icalendar/cal.py", line 426, in to_ical
content_lines = self.content_lines(sorted=sorted)
File "/home/martin/.local/lib/python3.9/site-packages/icalendar/cal.py", line 415, in content_lines
cl = self.content_line(name, value, sorted=sorted)
File "/home/martin/.local/lib/python3.9/site-packages/icalendar/cal.py", line 408, in content_line
return Contentline.from_parts(name, params, value, sorted=sorted)
File "/home/martin/.local/lib/python3.9/site-packages/icalendar/parser.py", line 306, in from_parts
values = values.to_ical()
File "/home/martin/.local/lib/python3.9/site-packages/icalendar/prop.py", line 260, in to_ical
return b",".join(dts_ical)
File "/home/martin/.local/lib/python3.9/site-packages/icalendar/prop.py", line 259, in<genexpr>
dts_ical = (dt.to_ical() fordtin self.dts)
File "/home/martin/.local/lib/python3.9/site-packages/icalendar/prop.py", line 326, in to_ical
returnvPeriod(dt).to_ical()
File "/home/martin/.local/lib/python3.9/site-packages/icalendar/prop.py", line 520, in __init__
raise ValueError("Start time is greater than end time")
ValueError: Start time is greater than end time
But it's pretty obvious, that the start-time isn't greater than the end-time.
The text was updated successfully, but these errors were encountered:
I've downloaded a ics-file from the internet and read it with icalender. Then I want to extract just an event from that file and process it further.
Unfortunalety, icalendar doesn't transform the information back to ics, as an exception occures there
Minimal code to reproduce the problem:
which gives this output:
But it's pretty obvious, that the start-time isn't greater than the end-time.
The text was updated successfully, but these errors were encountered: