Open vwegert opened 10 months ago
The error message indicates that no events are returned by google when requesting items with those UIDs.
Your configuration rule syncs items in the last 90 days. The first one repeated daily until more than 90 days ago, so it doesn't fit the criteria. I don't think that it should even have been listed when listing events in the first place.
@WhyNotHugo That sounds plausible. In this case, the root cause would be a buggy server implementation that I can't do anything about... Is there a way to let vdirsyncer ignore such events (or rather treat them as non-existent and remove them from the local storage) rather than aborting the sync altogether?
I have temporarily fixed this by applying the following patch:
diff --git a/vdirsyncer/storage/dav.py b/vdirsyncer/storage/dav.py
index 697ebf0..c12cab2 100644
--- a/vdirsyncer/storage/dav.py
+++ b/vdirsyncer/storage/dav.py
@@ -550,7 +550,8 @@ class DAVStorage(Storage):
else:
rv.append((href, Item(raw), etag))
for href in hrefs_left:
- raise exceptions.NotFoundError(href)
+ dav_logger.warning(f"Server did not supply properties for {href}")
+# raise exceptions.NotFoundError(href)
for href, item, etag in rv:
yield href, item, etag
This is quite similar to the change proposed with #866, so it would be really great to get the PR merged...
I have temporarily fixed this by applying the following patch:
This worked for me. Thank you! I have a Google Calendar with entries from 2011 through 2024 that wouldn't sync without this.
I'm using vdirsyncer to mirror events from Google Calendar to a local storage (see config below). A few weeks ago, my installation of vdirsyncer suddenly started throwing error messages - without changes to the configuration and AFAIR also without changes to the installed versions. In the meantime, I performed a full upgrade in the hope that it would fix things - no such luck.
The problem only concerns one of the calendars I mirror. I've isolated that calendar in a new pair, removed all of the data except for tokens and config, ran the discovery and then an initial sync - this already results in the error. The abbreviated log is
I've tried to identify the entries causing the trouble using https://developers.google.com/calendar/api/v3/reference/events/get - these are the responses I'm seeing:
and
I can't find entries in the calendar matching these dates - not surprising since they are cancelled. I can't find anything in the recycle bin either.
vdirsyncer, version 0.19.2
Python 3.11.5
[pair mirror_NAME] a = "google_cal" b = "local_cal" collections = [ "NAME@gmail.com" ] conflict_resolution = "a wins" partial_sync = "ignore"
[storage google_cal] type = "google_calendar" token_file = "~/.vdirsyncer/tokens/google_cal_volker" client_id = "CLIENT_ID" client_secret = "CLIENT_SECRET" start_date = "datetime.now() - timedelta(days=90)" end_date = "datetime.now() + timedelta(days=90)" read_only = true
[storage local_cal] type = "singlefile" path = "~/public_html/%s.ics"