python-caldav / caldav

Apache License 2.0
328 stars 98 forks source link

Possibly the server has a path handling problem, possibly the URL configured is wrong. #377

Open dieterbahr opened 10 months ago

dieterbahr commented 10 months ago

Hi, url is the right one and it shows me the calender in Homeassistant, but i get always this hint Its an calDAV Calender on a synology diskstation

Logger: caldav Source: /usr/local/lib/python3.11/site-packages/caldav/objects.py:303 First occurred: 11:02:20 (2 occurrences) Last logged: 11:02:21

Possibly the server has a path handling problem, possibly the URL configured is wrong. Path expected: /caldav/Dieter, path found: ['/caldav.php/Dieter/'] 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. Continuing, probably everything will be fine

tobixen commented 10 months ago

I should probably consider to simply remove that warning.

Bikervossibaer commented 9 months ago

I have the same problem with my Synology DiskStation and Caldav integration in HA.

My calendars are displayed correctly.

However, I cannot edit, delete or add appointments. Is this normal?

tobixen commented 9 months ago

I also haven't figured out how to edit, delete or add appointments in HomeAssistant.

Bikervossibaer commented 9 months ago

In my Google calendar, which I use as a Workday sensor and trash calendar, I can edit and delete appointments.

However, since I don't want to use the Google calendar for my office organization, it's a shame that the Caldav integration doesn't work here.

In my opinion, it can't be Synology's fault, as the Caldav synchronization works perfectly on two Android devices (DAVX-App) and a Windows PC (Thunderbird email), including all editing and deletion functions.

tobixen commented 9 months ago

As for the "path handling problem" with synology, it may be related to my findings in #191, where the URL was configured as /caldav/, but reported back from synology as `/caldav.php/'. It's unrelated to any editing issues however.

Writing, editing and deleting events in Synology should work - I did manage to run the test suite towards Synology while doing research into #191.

Writing, editing and deleting events in HomeAssistant using the caldav interface is another thing - I have the impression that this is a bit work under progress, but since I'm not directly involved in the HomeAssistant caldav integration I may be wrong on that account.

Bikervossibaer commented 9 months ago

Thank you very much for the quick information.

I have changed the caldav integration in HA by adding 'caldav.php' to the path.

HA has accepted this. All Synology calendars are synchronized. Editing does not work via HA (maybe in the future?).

So far no more error messages.

What I have noticed, however, is that the HA integration in the caldav URL only accepts the IP address of the Synology. The domain name is not accepted.

eelcohn commented 8 months ago

I'm experiencing the same error warning on my Home Assistant docker setup and CalDAV package on my Synology.

Interesingly enough I saw the same error on my Android phone, which uses DAVx5 for syncing the calendar between my Synology DSM and my Android phone.

My thoughts so far is that Synology changed something in either their Calendar-package or their nginx configuration (which is used as a reversed proxy for all Synology packages with a web-interface), and that they changed the URL from caldav to caldav.php. This change got pushed to my DSM during an DSM-update or an Calendar-package-update. Not sure if this is really the case, but this is my working theory for now.

tobixen commented 8 months ago

It's a warning, not an error. :-) Interesting that DAVx5 is showing the same warning. DAVx5 is not using this library, so probably not exactly the same error?

eelcohn commented 8 months ago

It's a warning, not an error. :-)

Edited ;-)

Interesting that DAVx5 is showing the same warning. DAVx5 is not using this library, so probably not exactly the same error?

Nope, it's not the exact same warning, but it does show a similar warning. Just wanted to let you know this; hope it helps explaining this issue.

stiltjack commented 17 hours ago

Same issue here:

Logger: caldav
Source: /usr/local/lib/python3.12/site-packages/caldav/objects.py:303
First occurred: 11:43:59 (1 occurrences)
Last logged: 11:43:59

Possibly the server has a path handling problem, possibly the URL configured is wrong. Path expected: /caldav/Stiltjack, path found: ['/caldav.php/Stiltjack/'] 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. Continuing, probably everything will be fine

Only happens on restart, though, and everything is indeed fine. In view of the comments above, I'll monitor a bit longer, then probably just filter it out.

tobixen commented 16 hours ago

@stiltjack known configuration problem, change /caldav to /caldav.php in the caldav URL in the configuration and the warning should disappear.