khal icon indicating copy to clipboard operation
khal copied to clipboard

Autoconfiguration does not detect vdirsyncer

Open HNieme opened this issue 3 years ago • 4 comments

I installed vdirsyncer in ~/.local/programs/vdirsyncer, its config-file is at ~/.config/vdirsyncer/config (with environment-variable set) and status_path = "~/.local/share/vdirsyncer/" set in the config-file (so the homedirectory doesn't get so cluttered) I followed the clean-hard-way installation-method https://vdirsyncer.pimutils.org/en/stable/installation.html#the-clean-hard-way.

$ echo $VDIRSYNCER_CONFIG
/home/harald/.config/vdirsyncer/config
$ ls -al /home/harald/.config/vdirsyncer/config
-rw------- 1 harald harald 2322 Sep  3 14:40 /home/harald/.config/vdirsyncer/config


khal is installed at ~/.local/programs/khal using

$ virtualenv -p python3.7 ~/.local/programs/khal
$ ~/.local/programs/khal/bin/pip3.7 install khal

It's config is at ~/.config/khal

When running khal configure vdirsyncer cannot be found:

$ khal configure
...
If you use vdirsyncer to sync with CalDAV servers, we can try to load its config file and add your calendars to khal's config.
Should we try to load vdirsyncer's config? [Y/n]: y
Sorry, cannot import vdirsyncer. Please make sure you have it installed.
...
$ echo $VDIRSYNCER_CONFIG
/home/harald/.config/vdirsyncer/config

HNieme avatar Sep 03 '20 14:09 HNieme

Hi.

That error message means that it is failing to import vdirsyncer as a python module. For it to work, vdirsyncer must be installed in khal's environment. You don't need to use vdirsyncer from there, but the configuration wizard needs it to be present.

Alternatively you can configure khal manually.

d7415 avatar Sep 03 '20 14:09 d7415

I've already configured it manually, but it still would be nice if this would work or at least be mentioned in the documentation and wizard.

HNieme avatar Sep 03 '20 14:09 HNieme

@HNieme Do you have a suggestion on how to document this behavior (the expectation that vdirsyncer is needed in the same environment as khal for the config wizard to work) better?

geier avatar Oct 02 '20 18:10 geier

I've checked the in the README(s) linked documentations of both vdirsyncer and khal. Neither of them have mentioned in their installation-page that they have to be installed in an environment together to work flawlessly.

I think it would be good to mention that at both of the installation manuals (The vdirsyncer + khal - combination is brobably used by most people anyway).

HNieme avatar Oct 17 '20 11:10 HNieme