When I run this code in Python 3.75, vscode:
from icalendar import Calendar
import requests
SkeddaBridgeURL = 'https://bridgeartspace.skedda.com/ical?key=457bda7'
f=requests.get(SkeddaBridgeURL)
c = Calendar.from_ical(f.text)
I get this error:
VTIMEZONEs sub-components' DTSTART must be of type datetime, not date
File "/Users/jeff/Scrape/Code/skedda.py", line 6, in <module>
c = Calendar.from_ical(f.text)
But when I run this URL through the ical validator at https://icalendar.org/validator.html, I get no errors.
I don't feel qualified to call this a bug, but maybe it is!
One way I have tried to deal with this is to suppress Assertion Errors by a startup flag as:
python 3 -Oc "Assert False"
But I fail to see how to set this as a flag in VSCode, which I am also learning.
Furthermore, running the debugger on this code, having installed icalendar
via pip3, I cannot step into the code, or modify it. Will I need to figure out how to download the entire module from github and go delete the assertion?
A timezone daylight saving change begins at a DATE & TIME not just on a day so it must be a DATE-TIME not a DATE. From https://icalendar.org/iCalendar-RFC-5545/3-6-5-time-zone-component.html
The mandatory "DTSTART" property gives the effective onset date and local time for the time zone sub-component definition. "DTSTART" in this usage MUST be specified as a date with a local time value.
The various validators do not pick up everything in my experience, so i try to check with all I can find. In addition, the various major calendar applications do not all support everything in the RFC5545 specification. ( Eg: google calendar didnt do recurring BYHOUR last I checked.) Therefore it is best to also do testing with the major calendar applications as well. Google used to be very finicky about files without always a good message.