Skip to content

Exception thrown in tentatively_accept_invite() #163

@gregn610

Description

@gregn610

I've got a loop over what I think is a list of very similar invites but it's repeatably throwing an exception.
This against a hosted Baïkal 0.9.1 server, I can provide access if that helps.

    for inbox_item in course.principal.schedule_inbox().get_items():
        # NB! No idea what I'm doing here !!!
        obj = CalendarObjectResource(client=course.ical_client, url=inbox_item[0])
        if obj.is_invite_request():
            print(f"tentatively accepting invite for {obj.icalendar_instance.subcomponents[0]['organizer']}")
            obj.tentatively_accept_invite(calendar=course.calendar)
            obj.delete()
ERROR:caldav:Deviation from expectations found.  Please raise an issue at https://github.com/python-caldav/caldav/issues or reach out to t-caldav@tobixen.no, include this error and the traceback and tell what server you are using
Traceback (most recent call last):
  File "/Users/gregn610/.pyenv/versions/3.9.4/envs/ldc3.9/lib/python3.9/site-packages/caldav/objects.py", line 1114, in get_items
    self._items = self.objects(load_objects=True)
  File "/Users/gregn610/.pyenv/versions/3.9.4/envs/ldc3.9/lib/python3.9/site-packages/caldav/objects.py", line 1037, in objects_by_sync_token
    (response, objects) = self._request_report_build_resultlist(root, props=[dav.GetEtag()], no_calendardata=True)
  File "/Users/gregn610/.pyenv/versions/3.9.4/envs/ldc3.9/lib/python3.9/site-packages/caldav/objects.py", line 740, in _request_report_build_resultlist
    response = self._query(xml, 1, 'report')
  File "/Users/gregn610/.pyenv/versions/3.9.4/envs/ldc3.9/lib/python3.9/site-packages/caldav/objects.py", line 166, in _query
    raise error.exception_by_method[query_method](errmsg(ret))
caldav.lib.error.ReportError: AuthorizationError at '415 Unsupported Media Type

b'<?xml version="1.0" encoding="utf-8"?>\n<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">\n  <s:sabredav-version>4.3.0</s:sabredav-version>\n  <s:exception>Sabre\\DAV\\Exception\\ReportNotSupported</s:exception>\n  <s:message>The {DAV:}sync-collection REPORT is not supported on this url.</s:message>\n  <d:supported-report/>\n</d:error>\n'', reason 'no reason'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/gregn610/.pyenv/versions/3.9.4/envs/ldc3.9/lib/python3.9/site-packages/caldav/lib/error.py", line 25, in assert_
    assert(condition)
AssertionError

Many thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions