pimutils / pimutils/vdirsyncer

An exception occurred during PROPFIND request on '/': type object 'Collection' has no attribute 'user'

Open
#856 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Something went wrong when I sync my contacts. Debug output:

$ vdirsyncer -vdebug sync
debug: Using 1 maximal workers.
Syncing my_contacts
debug: PROPFIND http://localhost:37358/
debug: {'User-Agent': 'vdirsyncer/0.16.8', 'Content-Type': 'application/xml; charset=UTF-8', 'Depth': '1'}
debug: b'<?xml version="1.0" encoding="utf-8" ?>\n            <D:propfind xmlns:D="DAV:">\n                <D:prop>\n                    <D:resourcetype/>\n                    <D:getcontenttype/>\n                    <D:getetag/>\n                </D:prop>\n            </D:propfind>\n            '
debug: Sending request...
debug: 500
debug: {'Date': 'Thu, 03 Dec 2020 13:06:56 GMT', 'Server': 'WSGIServer/0.2 CPython/3.8.1', 'Content-Length': '59', 'Content-Type': 'text/plain'}
debug: b'A server error occurred.  Please contact the administrator.'
error: Unknown error occurred for my_contacts: 500 Server Error: Internal Server Error for url: http://localhost:37358/
error: Use `-vdebug` to see the full traceback.
debug:   File "/home/egrep/.local/lib/python3.8/site-packages/vdirsyncer/cli/tasks.py", line 62, in sync_collection
debug:     sync.sync(
debug:   File "/home/egrep/.local/lib/python3.8/site-packages/vdirsyncer/sync/__init__.py", line 135, in sync
debug:     b_nonempty = b_info.prepare_new_status()
debug:   File "/home/egrep/.local/lib/python3.8/site-packages/vdirsyncer/sync/__init__.py", line 44, in prepare_new_status
debug:     for href, etag in self.storage.list():
debug:   File "/home/egrep/.local/lib/python3.8/site-packages/vdirsyncer/storage/dav.py", line 630, in list
debug:     response = self.session.request('PROPFIND', '', data=data,
debug:   File "/home/egrep/.local/lib/python3.8/site-packages/vdirsyncer/storage/dav.py", line 388, in request
debug:     return http.request(method, url, session=self._session, **more)
debug:   File "/home/egrep/.local/lib/python3.8/site-packages/vdirsyncer/http.py", line 162, in request
debug:     r.raise_for_status()
debug:   File "/home/egrep/.local/lib/python3.8/site-packages/requests/models.py", line 943, in raise_for_status
debug:     raise HTTPError(http_error_msg, response=self)
error: 1 out of 2 tasks failed.

Config:

[general]
status_path = "~/.local/state/vdirsyncer/"

[pair my_contacts]
a = "my_contacts_local"
b = "my_contacts_remote"
collections = null
metadata = ["displayname"]
conflict_resolution = ["command", "diff"]

[storage my_contacts_local]
type = "filesystem"
path = "~/.local/share/contacts"
fileext = ".vcf"

[storage my_contacts_remote]
type = "carddav"
url = "http://localhost:37358/"
username = "redacted"
password = "redacted"
$ systemctl status --user etesync-dav
● etesync-dav.service - Cal/CardDAV frontend for Etesync
     Loaded: loaded (/home/egrep/.config/systemd/user/etesync-dav.service; enabled; vendor preset: enabled)
     Active: active (running) since Thu 2020-12-03 14:58:44 EET; 12min ago
   Main PID: 110329 (etesync-dav)
     CGroup: /user.slice/user-1000.slice/user@1000.service/etesync-dav.service
             ├─110329 /usr/local/bin/etesync-dav
             └─110331 /usr/local/bin/etesync-dav

Dec 03 14:58:44 saturn systemd[1427]: Started Cal/CardDAV frontend for Etesync.
Dec 03 14:58:54 saturn etesync-dav[110331]: [2020-12-03 14:58:54 +0200] [110331/Thread-1] [ERROR] An exception occurred during PROPFIND request on '/': type object 'Collection' has no attribute 'user'
Dec 03 15:00:21 saturn etesync-dav[110331]: [2020-12-03 15:00:21 +0200] [110331/Thread-3] [ERROR] An exception occurred during PROPFIND request on '/': type object 'Collection' has no attribute 'user'
Dec 03 15:01:48 saturn etesync-dav[110331]: [2020-12-03 15:01:48 +0200] [110331/Thread-4] [ERROR] An exception occurred during PROPFIND request on '/': type object 'Collection' has no attribute 'user'
Dec 03 15:02:05 saturn etesync-dav[110331]: [2020-12-03 15:02:05 +0200] [110331/Thread-9] [ERROR] An exception occurred during PROPFIND request on '/': type object 'Collection' has no attribute 'user'
Dec 03 15:06:56 saturn etesync-dav[110331]: [2020-12-03 15:06:56 +0200] [110331/Thread-10] [ERROR] An exception occurred during PROPFIND request on '/': type object 'Collection' has no attribute 'user'

Take a look at:

An exception occurred during PROPFIND request on '/': type object 'Collection' has no attribute 'user'


  • vdirsyncer version: 0.16.8
  • Server software: EteSync via etesync-dav v0.30.5 and radicale v3.0.3
  • Python version: 3.8.5
  • Operating system: Ubuntu 20.04

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 storage/dav.py around the list() call at line 630 and the request handling in http.py, then reproduce the PROPFIND against the provided etesync-dav configuration. Compare the client traceback with the etesync-dav server error to determine whether this is a vdirsyncer compatibility bug or a server-side failure; done means the cause and a reproducible fix or documented limitation are established.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.