syncall icon indicating copy to clipboard operation
syncall copied to clipboard

[BUG] Cannot run sync twice on TW<->CalDAV

Open RaitoBezarius opened this issue 2 years ago • 10 comments

Describe the bug

On second restart of synchronization, I get a crash with the following trace: https://gist.github.com/RaitoBezarius/4af81a60c5736dbabc44b71e975b9ebe

To Reproduce

I run the following script:

#!/nix/store/vqvj60h076bhqj6977caz0pfxs6543nb-bash-5.2-p15/bin/bash
set -o errexit
set -o nounset
set -o pipefail

export PATH="/nix/store/iz4dlydb7paz2f8xi0dfk6kfdmhm7d4c-gnupg-2.4.1/bin:$PATH"

export TASKRC=/home/raito/.config/task/taskrc
/nix/store/5kwpflid12cs3gxdc8vzg7sdgdw8826k-syncall-1.5.1/bin/tw_caldav_sync \
  --caldav-calendar TODO \
  --caldav-url https://redacted/remote.php/dav \
  --caldav-user raito \
  --caldav-passwd-pass-path /nix/store/qzy8q7j8ig8086pkbjszh6x0kxg3qzdl-kachpass/bin/kachpass \
  --caldav-passwd Private/nextCloud/twsync \
  --resolution-strategy MostRecentRS \
  --taskwarrior-tags sync-caldav \

twice.

kachpass is just a sophisticated pass interface with caching with kernel keyring.

Expected Behavior

The second time it should also work and continue sync.

📸 Screenshots

If applicable, add screenshots to help explain your problem.

Versions

OS Version (cat /etc/*-release; uname -a)

NixOS 23.11pre526036.3b1f3712a415 (Tapir).

Python version (python --version; python3 --version)

3.10.12

--version of your executable

tw_caldav_sync, version 1.5.1

(I am the packager of syncall in nixpkgs.)

Additional context

Contents of the YAML:

❯ cat ~/.config/syncall/TODO__None__sync-caldav__False__False.yaml
Tw_caldav_ids: !!python/object/apply:bidict._base._from_other
- !!python/name:bidict.bidict ''
- {}
- false

RaitoBezarius avatar Sep 15 '23 23:09 RaitoBezarius

Hi @RaitoBezarius sorry for the delay and thanks for shipping this tool to NixOS :)

This looks like an issue with PyYAML, not with syncall or bubop per se. Could you dump the list of python packages and their versions ? e.g., with pip3 freeze

bergercookie avatar Dec 31 '23 17:12 bergercookie

I too encountered this issue here on NixOS, and I tried to install syncall with pyyaml5.3.1 and it didn't help either. (@RaitoBezarius my branch is available here). In my case this wasn't even related to running it twice, it simply failed to run for the first time...

doronbehar avatar Jun 12 '24 23:06 doronbehar

I made another attempt to use all of the dependencies pinned, and I encountered other errors.. so I will no longer put my efforts on this.

https://github.com/NixOS/nixpkgs/pull/319519

doronbehar avatar Jun 13 '24 08:06 doronbehar

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Aug 15 '24 15:08 github-actions[bot]

I cannot reproduce this issue unfortunately with syncall 1.8.7 + PyYAML 5.3.1, bidict 0.21.4. If you can provide me with a set of commands I can reproduce it with I'm happy to look at it further.

I too encountered this issue here on NixOS, and I tried to install syncall with pyyaml5.3.1 and it didn't help either. (@RaitoBezarius my branch is available here). In my case this wasn't even related to running it twice, it simply failed to run for the first time...

https://github.com/doronbehar/nixpkgs/pull/new/WIP/syncall

This redirects to a new PR page to the nixpkgs repo. Probably there was a paste error here @doronbehar

bergercookie avatar Aug 16 '24 11:08 bergercookie

Closing this as I cannot repro but can re-open on new information :)

bergercookie avatar Aug 16 '24 11:08 bergercookie

doronbehar/nixpkgs/pull/new/WIP/syncall

This redirects to a new PR page to the nixpkgs repo. Probably there was a paste error here @doronbehar

Not a paste error. If you'd scroll down a bit you can see the dependencies I tried to pin.

syncall 1.8.7 + PyYAML 5.3.1, bidict 0.21.4.

I didn't pin bidict to this version though, so this might be what I missed. I don't have time now to put my efforts into trying again though, sorry. In anycase, it'd be nice if syncall would have been updated to support the new API of all of these libraries...

doronbehar avatar Aug 16 '24 15:08 doronbehar