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
` File "./icsfeed.py", line 36, in get_todays_events
c = Calendar(urlopen(url).read().decode('iso-8859-1'))
File "/usr/local/lib/python2.7/dist-packages/ics/icalendar.py", line 71, in __init__
self._populate(container[0]) # Use first calendar
File "/usr/local/lib/python2.7/dist-packages/ics/component.py", line 52, in _populate
extractor.function(self, lines) # Send a list or empty list
File "/usr/local/lib/python2.7/dist-packages/ics/icalendar.py", line 223, in timezone
timezones = tzical(fake_file) # tzical does not like strings
File "/usr/lib/python2.7/dist-packages/dateutil/tz/tz.py", line 748, in __init__
self._parse_rfc(fileobj.read())
File "/usr/lib/python2.7/dist-packages/dateutil/tz/tz.py", line 891, in _parse_rfc
raise ValueError("unsupported property: "+name)
ValueError: unsupported property: SEQUENCE
The text was updated successfully, but these errors were encountered:
Avoidance: Send text thru this before feeding to Calendar():
@staticmethod
def _remove_sequence_from_vtimezone(text): # Avoid BUG: https://github.com/C4ptainCrunch/ics.py/issues/90
result = ''
lines = text.split('\n')
in_vt = False
for i in reversed(range(len(lines))):
line = lines[i]
if in_vt:
if line.startswith('SEQUENCE:'):
#print(f'del SEQUENCE at line {i}')
del lines[i]
elif line.startswith('BEGIN:VTIMEZONE'):
#print(f'not in_vt at line {i}')
in_vt = False
elif line.startswith('END:VTIMEZONE'):
#print(f'in_vt at line {i}')
in_vt = True
return '\n'.join(lines)
I have an ics feed from Confluence. It contains things like:
which causes a python backtrace an d error:
The text was updated successfully, but these errors were encountered: