bergercookie / syncall

Bi-directional synchronization between services such as Taskwarrior, Google Calendar, Notion, Asana, and more
MIT License
456 stars 41 forks source link

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

Closed RaitoBezarius closed 3 months ago

RaitoBezarius commented 1 year ago

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
bergercookie commented 11 months ago

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

doronbehar commented 5 months ago

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 commented 5 months ago

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

github-actions[bot] commented 3 months ago

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.

bergercookie commented 3 months ago

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 commented 3 months ago

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

doronbehar commented 3 months ago

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...

niksingh710 commented 2 weeks ago

@RaitoBezarius the package installs fine. below is the error that i am facing.

󰘧 tw_gtasks_sync
2024-11-19 16:03:05.172 | ERROR    | syncall.app_utils:inform_about_app_extras:242 -
You have to install the google,tw extras for tw_gtasks_sync to work.
With pip, you can do it with something like: "pip3 install syncall[google,tw]"
Exiting.