Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multiple periods in 1 freebusy component #27

Open
rainerstudhalter opened this issue Feb 2, 2012 · 3 comments
Open

multiple periods in 1 freebusy component #27

rainerstudhalter opened this issue Feb 2, 2012 · 3 comments
Labels
hacktoberfest Issues for participation in the hacktoberfest https://hacktoberfest.com/ tested and needs fix This pull request tests code but needs a contribution to fix the test - TDD
Milestone

Comments

@rainerstudhalter
Copy link

the following is a freebusy response to a freebusy request

"BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//davmail.sf.net/NONSGML DavMail Calendar V1.1//EN
METHOD:REPLY
BEGIN:VFREEBUSY
DTSTAMP:20120131T123000Z
ORGANIZER:MAILTO:organizer@domain.tld
DTSTART:20120101T000000Z
DTEND:20120201T000000Z
UID:null
ATTENDEE:MAILTO:attendee@domain.tld
FREEBUSY;FBTYPE=BUSY:20120103T091500Z/20120103T101500Z,20120113T130000Z/20120113T150000Z,20120116T130000Z/20120116T150000Z,20120117T091500Z/20120117T101500Z,20120118T160000Z/20120118T163000Z,20120124T083000Z/20120124T093000Z,20120124T123000Z/20120124T143000Z,20120131T091500Z/20120131T101500Z
END:VFREEBUSY
END:VCALENDAR"

when i parse this via icalendar.Calendar.from_ical(myresponse_string) i get the following error:

"Traceback (most recent call last):
File "./test.py", line 68, in
test2()
File "./test.py", line 56, in test2
ical = icalendar.Calendar.from_ical(rtext)
File "/usr/local/zope2.13/local/lib/python2.7/site-packages/icalendar-3.0-py2.7.egg/icalendar/cal.py", line 380, in from_ical
vals = factory(factory.from_ical(vals))
File "/usr/local/zope2.13/local/lib/python2.7/site-packages/icalendar-3.0-py2.7.egg/icalendar/prop.py", line 774, in from_ical
raise ValueError, 'Expected period format, got: %s' % ical
ValueError: Expected period format, got: 20120103T091500Z/20120103T101500Z,20120113T130000Z/20120113T150000Z,20120116T130000Z/20120116T150000Z,20120117T091500Z/20120117T101500Z,20120118T160000Z/20120118T163000Z,20120124T083000Z/20120124T093000Z,20120124T123000Z/20120124T143000Z,20120131T091500Z/20120131T101500Z"

according to rfc 5545 this is a valid format, see:
http://tools.ietf.org/html/rfc5545#page-62

@garbas
Copy link
Contributor

garbas commented Feb 27, 2012

selfnote: create/update test for this

@kfred
Copy link

kfred commented Jul 13, 2018

@RainerWahnsinn would you mind sharing the body of the freebusy request you made? I am trying to figure out freebusy requests and so far have only been able to successfully make free-busy-query requests for my own calendar, but I would like to be able to retrieve the freebusy from other users. Below is the payload I am sending in my request:

<?xml version='1.0' encoding='utf-8'?>
<C:free-busy-query xmlns:C="urn:ietf:params:xml:ns:caldav" xmlns:D="DAV">
        <C:time-range start="20180711T140000Z" end="20180712T220000Z"/>
</C:free-busy-query>

The following response is what I get:

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Example Corp.//CalDAV Client//EN
BEGIN:VFREEBUSY
UID:null
DTSTART:20180711T140000Z
DTEND:20180712T220000Z
DTSTAMP:20180713T191302Z
FREEBUSY;FBTYPE=BUSY:20180711T163000Z/PT30M,20180711T180000Z/PT1H,20180712
 T200000Z/PT30M
END:VFREEBUSY
END:VCALENDAR

How did you get the originator and attendee params to show up in the response?

niccokunzmann added a commit that referenced this issue Aug 30, 2023
@niccokunzmann niccokunzmann added tested and needs fix This pull request tests code but needs a contribution to fix the test - TDD hacktoberfest Issues for participation in the hacktoberfest https://hacktoberfest.com/ and removed blocker labels Aug 30, 2023
jacadzaca added a commit to jacadzaca/icalendar that referenced this issue Sep 30, 2023
@niccokunzmann
Copy link
Member

@jacadzaca, your contribution is live in v5.0.11. What needs doing about this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest Issues for participation in the hacktoberfest https://hacktoberfest.com/ tested and needs fix This pull request tests code but needs a contribution to fix the test - TDD
Projects
None yet
Development

No branches or pull requests

4 participants