python-caldav / caldav

Apache License 2.0
312 stars 91 forks source link

Regression: master version does not work towards calendar.mail.ru #400

Closed tobixen closed 1 month ago

tobixen commented 1 month ago

client.principal() raises an error on the master version:

ValueError: Unexpected value None for cup

An error message not telling very much, but the "cup" here is current-user-principal.

It seems to work with 1.3.9, but not with master.

I'm looking into it.

tobixen commented 1 month ago

according to git bisect the commit 722e9c0a545fb6424447d1c32b181c9e3527bae7 broke things. Weird.

tobixen commented 1 month ago

It's related to #180.

722e9c0 does some validation on the data it receives from the calendar server and throwing an error for servers not supporting current-user-principal. Prior the code would continue without said input validation, and treat whatever URL given when initializing the DAVClient object as the Principal URL. As a side-effect, calendar servers not supporting current-user-principal can still work. I think the proper thing to do here is to throw a warning and continue.

tobixen commented 1 month ago

Sort of solved in 28716ebc67d709d914a88df912c7e4e1ee1980c9