How can I set/add categories on a existing calDAV-item? Change Summary works fine (first loop). On the category-loop comes an error.
all_events = my_calendar.events()
for event in all_events:
event.load()
if "xxxxx" in event.vobject_instance.vevent.summary.value:
event.vobject_instance.vevent.summary.value="xxxxx cc" #this works
event.save()
event.load()
print(event.data)
for event in all_events:
event.load()
if "xxxxx" in event.vobject_instance.vevent.summary.value:
event.vobject_instance.vevent.categories= ["Test"] #ERROR while SAVE
event.save()
event.load()
print(event.data)
Error:
File "C:\Anaconda\Anaconda3\lib\site-packages\vobject\icalendar.py", line 976, in findTzids
for child in obj.getChildren():
AttributeError: 'str' object has no attribute 'getChildren'