python-caldav / caldav

Apache License 2.0
321 stars 95 forks source link

Problem with accept invite in calendar #399

Open hello-tty opened 4 months ago

hello-tty commented 4 months ago

Hello. I use a script to automatically accept calendar appointments, but recently it stopped working for me. Tell me what could be the problem?

Example code I'm using

import requests
import caldav
username = 'login'
password = 'password'

room_url = 'https://calendar_address/calendars'
client = caldav.DAVClient(
    url=room_url,
    auth=(username, password)
)

principal = client.principal()
calendars = principal.calendars()
my_calendar = principal.calendar(name='Common')

events = my_calendar.events()
for event in events:
    if 'test' in event.data:
        print(event.url)
        my_calendar.event_by_url(event.url).accept_invite(my_calendar)

The error I get image

tobixen commented 4 months ago

The accept_invite-method is under-tested, I started working on this functionality and then it got deprioritized, sorry for that.

It seems like your calendar server does not want to yield your address. Did this work earlier, and now it has stopped working, you said?

Is it by any chance possible for you to set up a testing account at your calendar server that I could use for test purposes?

tobixen commented 3 months ago

Sorry that things are taking time.

There were quite some of the tests failing towards your server, so I've created #401 and I'll look a bit into that before working with this. (#400 is also relevant).

tobixen commented 3 months ago

I have reproduced the error in a test by now.

tobixen commented 3 months ago

Sorry for the slow progress here. I do have a plan for how to solve this, but it seems like I'm overbooked for the rest of this week at least ...

hello-tty commented 3 months ago

Hello! Well, we'll wait. Do you have any idea how long it will take for the problem to be resolved?