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
import ics
content = open("/tmp/invite.ics", "r").read()
cal = ics.Calendar(content) # able to parse it
filename_event = '/tmp/invite-new.ics'
with open(filename_event, 'w') as ics_file:
ics_file.writelines(cal)
boom.
Traceback (most recent call last):
File "~/test.py", line 9, in <module>
ics_file.writelines(cal)
File "~/python3.10/site-packages/ics/icalendar.py", line 107, in __iter__
yield from self.serialize_iter()
File "~/python3.10/site-packages/ics/component.py", line 81, in serialize_iter
return self.serialize().splitlines(keepends=True)
File "~/python3.10/site-packages/ics/component.py", line 72, in serialize
output(self, container)
File "~/python3.10/site-packages/ics/serializers/icalendar_serializer.py", line 27, in serialize_event
container.append(event.serialize())
File "~/python3.10/site-packages/ics/component.py", line 73, in serialize
return str(container)
File "~/python3.10/site-packages/ics/grammar/parse.py", line 119, in __str__
ret.append(str(line))
File "~/python3.10/site-packages/ics/grammar/parse.py", line 59, in __str__
params_str += ';{}={}'.format(pname, ','.join(self.params[pname]))
TypeError: sequence item 0: expected str instance, bool found
The text was updated successfully, but these errors were encountered:
Valid calendar definition with rsvp param.
Read, parse and serialize again.
boom.
The text was updated successfully, but these errors were encountered: