pimutils / pimutils/vdirsyncer
NotFoundError with UID containing a slash
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.9k
- Forks
- 185
- Avg merge
- 11h 49m
- Merged PRs (30d)
- 1
Description
vdirsyncer 0.19.3- on Void-Linux but installed via Home-Manager (Nix)
- python
3.12(via Nix) - Config file:
[general]
status_path = "/home/me/.local/share/vdirsyncer/status"
### Pairs
[pair calendar]
a = "calendar_remote"
b = "calendar_local"
collections = ["from a", "from b"]
metadata = ["color", "displayname", "description", "order"]
### Local storages
[storage calendar_local]
fileext = ".ics"
path = "/home/me/calendar/calendar"
type = "filesystem"
### Remote storages
[storage calendar_remote]
password.fetch = ["command", "get", "pwd"]
type = "caldav"
url = "https://zimbra.tld/dav/user@zimbra.tld"
username = "user@zimbra.tld"
vdirsyncer -vdebug syncoutput (last lines)
debug: Skipping '/dav/user@zimbra.tld/zimbra_name_for_distant_cal/distant_cal/87.ics', properties are missing.
error: Unknown error occurred for calendar/distant_cal: /dav/user@zimbra.tld/zimbra_name_for_distant_cal/distant_cal/130.ics
error: Use `-vdebug` to see the full traceback.
debug: File "/nix/store/hv0b6ks5dgmq0g3iykw51jbaw0d7fp71-python3.12-vdirsyncer-0.19.3/lib/python3.12/site-packages/vdirsyncer/cli/tasks.py", line 74, in sync_collection
debug: await sync.sync(
debug: File "/nix/store/hv0b6ks5dgmq0g3iykw51jbaw0d7fp71-python3.12-vdirsyncer-0.19.3/lib/python3.12/site-packages/vdirsyncer/sync/__init__.py", line 149, in sync
debug: a_nonempty = await a_info.prepare_new_status()
debug: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
debug: File "/nix/store/hv0b6ks5dgmq0g3iykw51jbaw0d7fp71-python3.12-vdirsyncer-0.19.3/lib/python3.12/site-packages/vdirsyncer/sync/__init__.py", line 69, in prepare_new_status
debug: async for href, item, etag in self.storage.get_multi(prefetch):
debug: File "/nix/store/hv0b6ks5dgmq0g3iykw51jbaw0d7fp71-python3.12-vdirsyncer-0.19.3/lib/python3.12/site-packages/vdirsyncer/storage/dav.py", line 553, in get_multi
debug: raise exceptions.NotFoundError(href)
Hey, I'm having an issue trying to sync a calendar I'm subscribed to on a zimbra account. Here, zimbra_name_for_distant_cal refers to the calendar on the Zimbra server that is subscribed to distant_cal, however, it looks like there are no subfolder distant_cal, it's just that items have UID distant_cal/num, with the slash character included. I'm guessing this is the cause for the NotFoundError, as / here is not a path separator.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the traceback locations in vdirsyncer/sync/init.py and vdirsyncer/storage/dav.py, especially get_multi() where NotFoundError is raised. Reproduce the Zimbra calendar case with an item whose UID contains a slash, then verify that such items are handled as UIDs rather than mistaken for path separators and can complete synchronization.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100