PROPFIND / returns 500: `type object 'Collection' has no attribute 'user'` (Storage.discover)

Open Beginner friendly
#371 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
65/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
api, backend

Research direction

Start in etesync_dav/radicale/storage.py and read Storage.discover() around the reported line 555, then trace how verify() sets the collection's user attribute. Reproduce with the authenticated depth-1 PROPFIND / request in the issue. Done when the request returns 207 and current-user-principal resolution works.

Written by the indexing model from the issue text.

Description

Description

After adding a user with etesync-dav manage add, every authenticated depth-1 PROPFIND / returns HTTP 500. This breaks account verification in macOS Calendar.app ("Unable to verify account details").

Environment

  • etesync-dav 0.35.1 — both the prebuilt macOS binary and a source install from the v0.35.1 tag
  • macOS 26.6.2, Apple Silicon (source install run under Rosetta x86_64, Python 3.9.6)
  • Radicale 3.2.0 (the version etesync-dav pins)
  • Server: hosted etesync.com account (api.etebase.com)

Log

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

Cause

etesync_dav/radicale/storage.py, in Storage.discover() (line 555 in 0.35.1):

yield cls(self, posixpath.join(path, cls.user))

user is only ever set as an instance attribute (per collection, in verify()), never on the class, so cls.user raises AttributeError. One-line fix:

yield cls(self, posixpath.join(path, self.user))

With that change, the root depth-1 PROPFIND / returns 207 and current-user-principal resolution works (I have this patch running locally).

Repro

curl -u user:pass -X PROPFIND -H 'Depth: 1' http://localhost:37358/    # 500

Also present on current master.

(With this fixed, a second 500 follows on the user-home PROPFIND — see my other issue: https://github.com/etesync/etesync-dav/issues/372 )

Dominant language
Python
Stars
332
Forks
61
PR merge metrics
No merged PRs in 30d

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • No pull request template
  • No 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.

More from etesync/etesync-dav

All issues in etesync/etesync-dav

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.