A leading space in UID will cause a NotFoundError with Google calendar
vdirsyncer, version 0.16.4
A leading space in the UID will cause a NotFoundError when syncing with Google calendar. Removing the space in the iCalendar file before importing to Google calendar allows vdirsyncer to sync correctly. The space is also preserved by Google when exported.
BEGIN:VCALENDAR
PRODID:-//WebTIS
VERSION:2.0
CALSCALE:GREGORIAN
METHOD:PUBLISH
BEGIN:VEVENT
DTSTAMP:20180518T160000Z
UID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx@tickets.virgintrainseastcoast.com
DTSTART:20180518T160000Z
DTEND:20180518T170000Z
SUMMARY:Journey Details:
DESCRIPTION:Booking Reference:
END:VEVENT
END:VCALENDAR
I think relevant lines from vdirsyncer -vdebug
debug: <D:response xmlns:carddav="urn:ietf:params:xml:ns:carddav" xmlns:cm="http://cal.me.com/_namespace/" xmlns:md="urn:mobileme:davservices">
debug: <D:href>/caldav/v2/xxxxxxxx%40gmail.com/events/+479xxxxxxxxxxxxxxxxxxxxxxxxx%40tickets.virgintrainseastcoast.com.ics</D:href>
debug: <D:propstat>
debug: <D:status>HTTP/1.1 200 OK</D:status>
debug: <D:prop>
debug: <D:getcontenttype>text/calendar; component=vevent</D:getcontenttype>
debug: <D:getetag>"63616214114"</D:getetag>
debug: </D:prop>
debug: </D:propstat>
debug: </D:response>
debug: Normalized URL from '/caldav/v2/xxxxxxxx%40gmail.com/events/+479xxxxxxxxxxxxxxx%40tickets.virgintrainseastcoast.com.ics' to '/caldav/v2/[email protected]/events/%[email protected]'
debug: Unsafe character: '%2B'
debug: Already normalized: '/caldav/v2/[email protected]/events/%[email protected]'
debug: <D:href>/caldav/v2/[email protected]/events/%[email protected]</D:href>
debug: <D:response xmlns:carddav="urn:ietf:params:xml:ns:carddav" xmlns:cm="http://cal.me.com/_namespace/" xmlns:md="urn:mobileme:davservices">
debug: <D:href>/caldav/v2/[email protected]/events/%[email protected]</D:href>
debug: <D:status>HTTP/1.1 404 Not Found</D:status>
debug: </D:response>
error: Unknown error occured for calendar_xxxxxxxxx_gmail_com/[email protected]: /caldav/v2/[email protected]/events/%[email protected]
error: Use `-vdebug` to see the full traceback.
debug: File "/nix/store/a8jyi8rvqdag5zviaxzxb85api600aws-vdirsyncer-0.16.4/lib/python3.6/site-packages/vdirsyncer/cli/tasks.py", line 69, in sync_collection
debug: partial_sync=pair.partial_sync
debug: File "/nix/store/a8jyi8rvqdag5zviaxzxb85api600aws-vdirsyncer-0.16.4/lib/python3.6/site-packages/vdirsyncer/sync/__init__.py", line 136, in sync
debug: b_nonempty = b_info.prepare_new_status()
debug: File "/nix/store/a8jyi8rvqdag5zviaxzxb85api600aws-vdirsyncer-0.16.4/lib/python3.6/site-packages/vdirsyncer/sync/__init__.py", line 59, in prepare_new_status
debug: if prefetch else ()):
debug: File "/nix/store/a8jyi8rvqdag5zviaxzxb85api600aws-vdirsyncer-0.16.4/lib/python3.6/site-packages/vdirsyncer/storage/dav.py", line 516, in get_multi
debug: raise exceptions.NotFoundError(href)
Thanks for reporting this.
Vdirsyncer did some weird stuff in the past to work around the deficiencies of other CalDAV servers. We can see if it's still necessary today for the servers we support.
On Thu, May 17, 2018 at 03:16:32PM -0700, Andy wrote:
vdirsyncer, version 0.16.4
A leading space in the UID will cause a NotFoundError when syncing with Google calendar. Removing the space in the iCalendar file before importing to Google calendar allows vdirsyncer to sync correctly. The space is also preserved by Google when exported.
BEGIN:VCALENDAR PRODID:-//WebTIS VERSION:2.0 CALSCALE:GREGORIAN METHOD:PUBLISH BEGIN:VEVENT DTSTAMP:20180518T160000Z UID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx@tickets.virgintrainseastcoast.com DTSTART:20180518T160000Z DTEND:20180518T170000Z SUMMARY:Journey Details: DESCRIPTION:Booking Reference: END:VEVENT END:VCALENDARI think relevant lines from
vdirsyncer -vdebugdebug: <D:response xmlns:carddav="urn:ietf:params:xml:ns:carddav" xmlns:cm="http://cal.me.com/_namespace/" xmlns:md="urn:mobileme:davservices"> debug: <D:href>/caldav/v2/xxxxxxxx%40gmail.com/events/+479xxxxxxxxxxxxxxxxxxxxxxxxx%40tickets.virgintrainseastcoast.com.ics</D:href> debug: <D:propstat> debug: <D:status>HTTP/1.1 200 OK</D:status> debug: <D:prop> debug: <D:getcontenttype>text/calendar; component=vevent</D:getcontenttype> debug: <D:getetag>"63616214114"</D:getetag> debug: </D:prop> debug: </D:propstat> debug: </D:response>debug: Normalized URL from '/caldav/v2/xxxxxxxx%40gmail.com/events/+479xxxxxxxxxxxxxxx%40tickets.virgintrainseastcoast.com.ics' to '/caldav/v2/[email protected]/events/%[email protected]'error: Unknown error occured for calendar_xxxxxxxxx_gmail_com/[email protected]: /caldav/v2/[email protected]/events/%[email protected] error: Use `-vdebug` to see the full traceback. debug: File "/nix/store/a8jyi8rvqdag5zviaxzxb85api600aws-vdirsyncer-0.16.4/lib/python3.6/site-packages/vdirsyncer/cli/tasks.py", line 69, in sync_collection debug: partial_sync=pair.partial_sync debug: File "/nix/store/a8jyi8rvqdag5zviaxzxb85api600aws-vdirsyncer-0.16.4/lib/python3.6/site-packages/vdirsyncer/sync/__init__.py", line 136, in sync debug: b_nonempty = b_info.prepare_new_status() debug: File "/nix/store/a8jyi8rvqdag5zviaxzxb85api600aws-vdirsyncer-0.16.4/lib/python3.6/site-packages/vdirsyncer/sync/__init__.py", line 59, in prepare_new_status debug: if prefetch else ()): debug: File "/nix/store/a8jyi8rvqdag5zviaxzxb85api600aws-vdirsyncer-0.16.4/lib/python3.6/site-packages/vdirsyncer/storage/dav.py", line 516, in get_multi debug: raise exceptions.NotFoundError(href)-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/pimutils/vdirsyncer/issues/734