skarim / vobject

A full-featured Python package for parsing and creating iCalendar and vCard files
https://vobject.sameenkarim.com
258 stars 93 forks source link

Can't upload calendar file: "multiple main components" #170

Closed rixx closed 3 years ago

rixx commented 3 years ago

I tried to upgrade from Radicale 2.x to 3.0. After Radicale didn't find my old calendar.ics, I decided to try to upload it instead. But the upload fails:

[2021-08-26 17:27:31 +0200] [32840/Thread-97] [WARNING] Bad PUT request on '/rixx/05e8cddf-b821-317d-e93c-3232c830bcab/': Multiple main components
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/radicale/app/put.py", line 73, in prepare
    item.prepare()
  File "/usr/lib/python3.9/site-packages/radicale/item/__init__.py", line 394, in prepare
    self.time_range
  File "/usr/lib/python3.9/site-packages/radicale/item/__init__.py", line 384, in time_range
    find_tag_and_time_range(self.vobject_item))
  File "/usr/lib/python3.9/site-packages/radicale/item/__init__.py", line 262, in find_tag_and_time_range
    radicale_filter.visit_time_ranges(vobject_item, tag, range_fn, infinity_fn)
  File "/usr/lib/python3.9/site-packages/radicale/item/filter.py", line 230, in visit_time_ranges
    for child, is_recurrence, recurrences in get_children(
  File "/usr/lib/python3.9/site-packages/radicale/item/filter.py", line 222, in get_children
    raise ValueError("Multiple main components")
ValueError: Multiple main components

This calendar file was in constant use with Radicale 2.x, in case that matters.

rixx commented 3 years ago

Sorry, wrong repo. I encountered bugs in both radicale and vobject and got confused while trying to open issues in both repos.