Skip to content

Error when sync google calendar #613

@Pepetops

Description

@Pepetops

Hi.
I use Opensuse Tumbleweed. vdirsyncer's version is 0.15.0 with Python's version 3.6.0
My config file is:

# CALDAV
[pair pepetops_calendar]
a = "local"
b = "google_calendar"
collections = ["from a", "from b"]
conflict_resolution = "b wins"
# Calendars also have a color property
#metadata = ["displayname", "color"]

[storage google_calendar]
type = "google_calendar"
token_file = "/home/popo/.vdirsyncer/token"
client_id = "BLABLABLA"
client_secret = "BLABLABLA"
start_date = "datetime.now() - timedelta(days=5)"
end_date = "datetime.now() + timedelta(days=365)"
#start_date = null
#end_date = null
#item_types = []

[storage local]
type = "singlefile"
path = "/home/popo/.local/share/orage/%s.ics"
#encoding = "utf-8"

When I make changes on my google calendar I have no problems to received the news on my PC, but if I do the other way around (from PC to Web) I have problems and nothings changes.
Partial debug is:

debug: Sending request...
debug: 409
debug: {'Vary': 'Origin, X-Origin', 'Content-Type': 'text/xml; charset=UTF-8', 'Content-Encoding': 'gzip', 'Date': 'Tue, 28 Mar 2017 07:52:21 GMT', 'Expires': 'Tue, 28 Mar 2017 07:52:21 GMT', 'Cache-Control': 'private, max-age=0', 'X-Content-Type-Options': 'nosniff', 'X-Frame-Options': 'SAMEORIGIN', 'X-XSS-Protection': '1; mode=block', 'Server': 'GSE', 'Alt-Svc': 'quic=":443"; ma=2592000; v="37,36,35"', 'Transfer-Encoding': 'chunked'}
debug: <?xml version="1.0" encoding="UTF-8"?>
debug: <D:error xmlns:D="DAV:"/>
error: Unknown error occured for pepetops_calendar/[email protected]: 409 Client Error: Conflict for url: https://apidata.googleusercontent.com/caldav/v2/[email protected]/events/[email protected]
error: Use `-vdebug` to see the full traceback.
debug:   File "/usr/lib/python3.6/site-packages/vdirsyncer/cli/utils.py", line 74, in handle_cli_error
debug:     raise e
debug:   File "/usr/lib/python3.6/site-packages/vdirsyncer/sync.py", line 268, in sync
debug:     action.run(a_info, b_info, conflict_resolution, partial_sync)
debug:   File "/usr/lib/python3.6/site-packages/vdirsyncer/sync.py", line 299, in run
debug:     self._run_impl(a, b)
debug:   File "/usr/lib/python3.6/site-packages/vdirsyncer/sync.py", line 354, in _run_impl
debug:     self.dest.storage.update(meta.href, self.item, meta.etag)
debug:   File "/usr/lib/python3.6/site-packages/vdirsyncer/storage/base.py", line 15, in inner
debug:     return f(self, *args, **kwargs)
debug:   File "/usr/lib/python3.6/site-packages/vdirsyncer/storage/base.py", line 15, in inner
debug:     return f(self, *args, **kwargs)
debug:   File "/usr/lib/python3.6/site-packages/vdirsyncer/storage/base.py", line 15, in inner
debug:     return f(self, *args, **kwargs)
debug:   File "/usr/lib/python3.6/site-packages/vdirsyncer/storage/dav.py", line 531, in update
debug:     href, etag = self._put(self._normalize_href(href), item, etag)
debug:   File "/usr/lib/python3.6/site-packages/vdirsyncer/storage/dav.py", line 507, in _put
debug:     headers=headers
debug:   File "/usr/lib/python3.6/site-packages/vdirsyncer/storage/dav.py", line 366, in request
debug:     return http.request(method, url, session=self._session, **more)
debug:   File "/usr/lib/python3.6/site-packages/vdirsyncer/http.py", line 181, in request
debug:     r.raise_for_status()
debug:   File "/usr/lib/python3.6/site-packages/requests/models.py", line 909, in raise_for_status
debug:     raise HTTPError(http_error_msg, response=self)
error: 1 out of 2 tasks failed.

Any idea?
Thanks a lot

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions