ics-py / ics-py

Pythonic and easy iCalendar library (rfc5545)

Home Page:http://icspy.readthedocs.org/en/stable/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

More than one PRODID in the file

anufrievroman opened this issue · comments

commented

Hello, thank you for the awesome library.

I am having an issue that if my file contains more that one PRODID line, the import crashes with:

ValueError: A VCALENDAR must have at most one PRODID

Example of the .ics file header:

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//IDN nextcloud.com//Calendar app 3.3.1//EN
PRODID:-//IDN nextcloud.com//Calendar app 3.0.3//EN
PRODID:-//IDN nextcloud.com//Calendar app 4.2.3//EN
PRODID:-//Sabre//Sabre VObject 4.4.2//EN
...

As far as I understand, all the apps that contributed to building the file somehow leave a stamp here, so it is not really "wrong" to have multiple lines. Is it possible to ignore this error somehow and continue parsing the file? I mean, it's not like it would affect parsing, or am I missing something?

Thank you!

rfc5545 says The property MUST be specified once in an iCalendar object which seems pretty clear.

commented

Thank you for clarification. I guess I'll just clean the file myself before parsing.