Skip to content

Fails to parse RFC 7986-compliant iCalendar files #1222

Description

@viiru-

The parser fails if the VCALENDAR element has a UID property (not allowed by RFC 5545 but added in RFC 7986, see https://www.rfc-editor.org/info/rfc7986/#section-5.3 ).

The issue can be triggered with a test like this:

def test_vcalendar_with_uid():
    vcal_with_uid = """BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Test//Test//EN
UID:calendar-uid-123
BEGIN:VEVENT
DTSTART:20140325T084000Z
DTEND:20140325T101000Z
UID:event-uid-456
SUMMARY:Test Event
END:VEVENT
END:VCALENDAR"""

    item = vobject.Item(vcal_with_uid)
    assert item.uid == "event-uid-456"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions