pimutils / pimutils/vdirsyncer

Unknown error, Precondition Failed

Open
#696 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

needinfo type: question
Dominant language
Python
Stars
1.9k
Forks
185
Avg merge
11h 49m
Merged PRs (30d)
1

Description

vdirsyncer, version 0.16.3
Python 3.5.3
Ubuntu 17.04
-vdebug output:

debug: Sending request...
debug: 412
debug: {'Cache-Control': 'private, max-age=0', 'Date': 'Mon, 01 Jan 2018 10:06:08 +0000', 'Connection': 'keep-alive', 'Expires': 'Mon, 01 Jan 2018 10:06:08 +0000', 'DAV': '1, calendar-access, calendar-schedule, calendarserver-private-events, addressbook', 'Server': 'DavMail Gateway 4.8.0.3-2488', 'Content-Length': '0'}

error: Unknown error occured for calendar_linz_ssan_to_local: Precondition Failed
error: Use `-vdebug` to see the full traceback.
debug:   File "/usr/local/lib/python3.5/dist-packages/vdirsyncer/cli/utils.py", line 74, in handle_cli_error
debug:     raise e
debug:   File "/usr/local/lib/python3.5/dist-packages/vdirsyncer/sync/__init__.py", line 153, in sync
debug:     partial_sync
debug:   File "/usr/local/lib/python3.5/dist-packages/vdirsyncer/sync/__init__.py", line 177, in run
debug:     self._run_impl(a, b)
debug:   File "/usr/local/lib/python3.5/dist-packages/vdirsyncer/sync/__init__.py", line 204, in _run_impl
debug:     href, etag = self.dest.storage.upload(self.item)
debug:   File "/usr/local/lib/python3.5/dist-packages/vdirsyncer/storage/base.py", line 15, in inner
debug:     return f(self, *args, **kwargs)
debug:   File "/usr/local/lib/python3.5/dist-packages/vdirsyncer/storage/base.py", line 15, in inner
debug:     return f(self, *args, **kwargs)
debug:   File "/usr/local/lib/python3.5/dist-packages/vdirsyncer/storage/dav.py", line 562, in upload
debug:     return self._put(href, item, None)
debug:   File "/usr/local/lib/python3.5/dist-packages/vdirsyncer/storage/dav.py", line 531, in _put
debug:     headers=headers
debug:   File "/usr/local/lib/python3.5/dist-packages/vdirsyncer/storage/dav.py", line 390, in request
debug:     return http.request(method, url, session=self._session, **more)
debug:   File "/usr/local/lib/python3.5/dist-packages/vdirsyncer/http.py", line 179, in request
debug:     raise exceptions.PreconditionFailed(r.reason)
error: 1 out of 2 tasks failed.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the traceback's vdirsyncer/http.py request handler and storage/dav.py _put, upload, and request paths. Use the provided -vdebug output and the 412 Precondition Failed response as the reproduction context. Done means identifying the cause of this DavMail upload failure and defining an appropriate error or handling change.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend, cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.