Skip to content

[Bug] X- properties cannot be parsed in jcal although their type is properly set. #1237

@niccokunzmann

Description

@niccokunzmann

Describe the bug

To reproduce

from icalendar import Calendar, vPeriod
import datetime
calendar = Calendar()
date_range = vPeriod([datetime.datetime(2025, 2, 2), datetime.datetime(2025, 2, 3)])
calendar["x-filter-date-range"] = date_range
jcal = calendar.to_jcal()
calendar2 = Calendar.from_jcal(jcal)  

Output:

icalendar.error.JCalParsingError: [1][2][3] in vUnknown: The value must be a string. Got value: ['2025-02-02T00:00:00', '2025-02-02T00:00:00']

Expected behavior

We should be able to parse this as we know which type we expect.
I would like a vPeriod in there.

Environment

  • Operating system: Linux
  • Python version: 3.13
  • icalendar version: 7.0.1

Additional context

  • I tested it with the latest version. For example, I used the command pip3 install --upgrade https://github.com/collective/icalendar.git.
  • I attached the .ics sample file, or there is no .ics sample file.

See also:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions