Sync aborted after a single error
chibenwa opened this issue · 2 comments
When running a sync, vdirsyncer migrates a contact with two FN properties, which actually is not supported in sabre older versions. The attempt fails, which is fine to me (after all that's a sabre issue).
Here is the original error:
error: Unknown error occurred for bob_contacts/contacts: 415, message='Unsupported Media Type', url=URL('https://dav.poc-mail-avocat.fr/addressbooks/6528c0dbbc1b180078e2aec4/contacts/sabre-vobject-8c1de447-93f7-457b-a37f-e5c237a11914.vcf')
error: Use `-vdebug` to see the full traceback.
debug: File "/home/hp/.local/pipx/venvs/vdirsyncer/lib/python3.10/site-packages/vdirsyncer/cli/utils.py", line 70, in handle_cli_error
debug: raise e
debug: File "/home/hp/.local/pipx/venvs/vdirsyncer/lib/python3.10/site-packages/vdirsyncer/sync/__init__.py", line 160, in sync
debug: await action.run(a_info, b_info, conflict_resolution, partial_sync)
debug: File "/home/hp/.local/pipx/venvs/vdirsyncer/lib/python3.10/site-packages/vdirsyncer/sync/__init__.py", line 183, in run
debug: await self._run_impl(a, b)
debug: File "/home/hp/.local/pipx/venvs/vdirsyncer/lib/python3.10/site-packages/vdirsyncer/sync/__init__.py", line 212, in _run_impl
debug: href, etag = await self.dest.storage.upload(self.item)
debug: File "/home/hp/.local/pipx/venvs/vdirsyncer/lib/python3.10/site-packages/vdirsyncer/storage/base.py", line 22, in inner
debug: return await f(self, *args, **kwargs)
debug: File "/home/hp/.local/pipx/venvs/vdirsyncer/lib/python3.10/site-packages/vdirsyncer/storage/base.py", line 22, in inner
debug: return await f(self, *args, **kwargs)
debug: File "/home/hp/.local/pipx/venvs/vdirsyncer/lib/python3.10/site-packages/vdirsyncer/storage/dav.py", line 601, in upload
debug: rv = await self._put(href, item, None)
debug: File "/home/hp/.local/pipx/venvs/vdirsyncer/lib/python3.10/site-packages/vdirsyncer/storage/dav.py", line 569, in _put
debug: response = await self.session.request(
debug: File "/home/hp/.local/pipx/venvs/vdirsyncer/lib/python3.10/site-packages/vdirsyncer/storage/dav.py", line 416, in request
debug: return await http.request(method, url, session=session, **more)
debug: File "/home/hp/.local/pipx/venvs/vdirsyncer/lib/python3.10/site-packages/vdirsyncer/http.py", line 157, in request
debug: response.raise_for_status()
debug: File "/home/hp/.local/pipx/venvs/vdirsyncer/lib/python3.10/site-packages/aiohttp/client_reqrep.py", line 1011, in raise_for_status
debug: raise ClientResponseError(
However the follow up operation fails, the next one with:
error: Unknown error occurred for bob_contacts/contacts: 415, message='Unsupported Media Type', url=URL('https://dav.poc-mail-avocat.fr/addressbooks/6528c0dbbc1b180078e2aec4/contacts/sabre-vobject-8c1de447-93f7-457b-a37f-e5c237a11914.vcf')
error: Use `-vdebug` to see the full traceback.
debug: File "/home/hp/.local/pipx/venvs/vdirsyncer/lib/python3.10/site-packages/vdirsyncer/cli/utils.py", line 70, in handle_cli_error
debug: raise e
debug: File "/home/hp/.local/pipx/venvs/vdirsyncer/lib/python3.10/site-packages/vdirsyncer/sync/__init__.py", line 160, in sync
debug: await action.run(a_info, b_info, conflict_resolution, partial_sync)
debug: File "/home/hp/.local/pipx/venvs/vdirsyncer/lib/python3.10/site-packages/vdirsyncer/sync/__init__.py", line 183, in run
debug: await self._run_impl(a, b)
debug: File "/home/hp/.local/pipx/venvs/vdirsyncer/lib/python3.10/site-packages/vdirsyncer/sync/__init__.py", line 212, in _run_impl
debug: href, etag = await self.dest.storage.upload(self.item)
debug: File "/home/hp/.local/pipx/venvs/vdirsyncer/lib/python3.10/site-packages/vdirsyncer/storage/base.py", line 22, in inner
debug: return await f(self, *args, **kwargs)
debug: File "/home/hp/.local/pipx/venvs/vdirsyncer/lib/python3.10/site-packages/vdirsyncer/storage/base.py", line 22, in inner
debug: return await f(self, *args, **kwargs)
debug: File "/home/hp/.local/pipx/venvs/vdirsyncer/lib/python3.10/site-packages/vdirsyncer/storage/dav.py", line 601, in upload
debug: rv = await self._put(href, item, None)
debug: File "/home/hp/.local/pipx/venvs/vdirsyncer/lib/python3.10/site-packages/vdirsyncer/storage/dav.py", line 569, in _put
debug: response = await self.session.request(
debug: File "/home/hp/.local/pipx/venvs/vdirsyncer/lib/python3.10/site-packages/vdirsyncer/storage/dav.py", line 416, in request
debug: return await http.request(method, url, session=session, **more)
debug: File "/home/hp/.local/pipx/venvs/vdirsyncer/lib/python3.10/site-packages/vdirsyncer/http.py", line 157, in request
debug: response.raise_for_status()
debug: File "/home/hp/.local/pipx/venvs/vdirsyncer/lib/python3.10/site-packages/aiohttp/client_reqrep.py", line 1011, in raise_for_status
And then all with:
debug: Sending request...
error: Unknown error occurred for bob_contacts/z-server-generated--system: Session is closed
error: Use `-vdebug` to see the full traceback.
debug: File "/home/hp/.local/pipx/venvs/vdirsyncer/lib/python3.10/site-packages/vdirsyncer/cli/utils.py", line 70, in handle_cli_error
debug: raise e
debug: File "/home/hp/.local/pipx/venvs/vdirsyncer/lib/python3.10/site-packages/vdirsyncer/sync/__init__.py", line 160, in sync
debug: await action.run(a_info, b_info, conflict_resolution, partial_sync)
debug: File "/home/hp/.local/pipx/venvs/vdirsyncer/lib/python3.10/site-packages/vdirsyncer/sync/__init__.py", line 183, in run
debug: await self._run_impl(a, b)
debug: File "/home/hp/.local/pipx/venvs/vdirsyncer/lib/python3.10/site-packages/vdirsyncer/sync/__init__.py", line 212, in _run_impl
debug: href, etag = await self.dest.storage.upload(self.item)
debug: File "/home/hp/.local/pipx/venvs/vdirsyncer/lib/python3.10/site-packages/vdirsyncer/storage/base.py", line 22, in inner
debug: return await f(self, *args, **kwargs)
debug: File "/home/hp/.local/pipx/venvs/vdirsyncer/lib/python3.10/site-packages/vdirsyncer/storage/base.py", line 22, in inner
debug: return await f(self, *args, **kwargs)
debug: File "/home/hp/.local/pipx/venvs/vdirsyncer/lib/python3.10/site-packages/vdirsyncer/storage/dav.py", line 601, in upload
debug: rv = await self._put(href, item, None)
debug: File "/home/hp/.local/pipx/venvs/vdirsyncer/lib/python3.10/site-packages/vdirsyncer/storage/dav.py", line 569, in _put
debug: response = await self.session.request(
debug: File "/home/hp/.local/pipx/venvs/vdirsyncer/lib/python3.10/site-packages/vdirsyncer/storage/dav.py", line 416, in request
debug: return await http.request(method, url, session=session, **more)
debug: File "/home/hp/.local/pipx/venvs/vdirsyncer/lib/python3.10/site-packages/vdirsyncer/http.py", line 136, in request
debug: response = await session.request(method, url, **kwargs)
debug: File "/home/hp/.local/pipx/venvs/vdirsyncer/lib/python3.10/site-packages/aiohttp/client.py", line 426, in _request
debug: raise RuntimeError("Session is closed")
Copying (uploading) item poc-audriga to my_destination/z-server-generated--system
My expectation would be that vdirsyncer continue to migrate and sync vcard when faced with a failure before reporting it to me (error code 1).
Things to include in your bugreport:
- Your vdirsyncer version :
vdirsyncer 0.19.2, installed using Python 3.10.12
- If applicable, which server software (and which version) you're using
- Origin: Sabre 4.5.2
- Destination: Sabre 3.2.2
- Your Python version Python 3.10.12
- Your operating system 22.04.1-Ubuntu
- Your config file
$ cat config.example
[general]
# A folder where vdirsyncer can store some metadata about each pair.
status_path = "~/.vdirsyncer/status/999012/carddav"
# CARDDAV
[pair bob_contacts]
a = "my_source"
b = "my_destination"
collections = ["from a"]
# Calendars also have a color property
metadata = ["displayname", "color"]
[storage my_source]
type = "carddav"
url = "https://xxxxx/remote.php/dav/addressbooks/users/yyy"
username = "yyy"
password = "abc"
[storage my_destination]
type = "carddav"
url = "https://fgnetmetym/addressbooks/6528c0dbbc1b180078e2aec4"
username = "zzzz"
password = "def"
- Use
vdirsyncer -vdebug
for debug output. The output is sensitive, but
please attach at least the last few lines before the error (if applicable),
censored as necessary. This is almost always the most useful information.
The vdirsyncer rewrite is capable of continuing sync even if one item fails. I'm not sure that it is feasible to fix this on the current version.
The vdirsyncer rewrite is capable of continuing sync even if one item fails.
Can you share this URL?