Running taskwarrior 2.6.1 with latest version of tasklib, python 3.9 installed with homebrew on mac.
I'm using taskwarrior with a couple of python hooks installed that get triggered when issuing certain taskwarrior commands. The hooks run fine when I use taskwarrior normally from the command line.
But I'm running into problems when the the hooks are trigged by a hotkey app called Karabiner Elements. Karabiner calls a simple perl script which in turn execute this bash command containing the task command:
Unfortunately, the stack error generated is cutoff in the Karabiner log. This is as much as I get:
[2021-12-07 06:24:51.797] [error] [console_user_server] shell_command stderr:Traceback (most recent call last): File "/Users/me/.task_work/hooks/on-add-pirate", line 9, in <module> from tasklib import TaskWarrior, Task File "/Users/me/Library/Python/3.8/lib/python/site-packages/tasklib/__init__.py", l...
I'm guessing the python script is choking because it can't figure out where needed libraries are. But I don't see any shell environment variables that I might be able to set. I have python3 installed with brew and the tasklib library installed with pip3 (I believe). I'm totally unfamiliar with python environment and libraries so a hand would be greatly appreciated.
Running taskwarrior 2.6.1 with latest version of tasklib, python 3.9 installed with homebrew on mac.
I'm using taskwarrior with a couple of python hooks installed that get triggered when issuing certain taskwarrior commands. The hooks run fine when I use taskwarrior normally from the command line.
But I'm running into problems when the the hooks are trigged by a hotkey app called Karabiner Elements. Karabiner calls a simple perl script which in turn execute this bash command containing the
task
command:/bin/bash -c 'TASKRC=/Users/me/.taskrc /usr/local/bin/task add \'the task\''
Unfortunately, the stack error generated is cutoff in the Karabiner log. This is as much as I get:
I'm guessing the python script is choking because it can't figure out where needed libraries are. But I don't see any shell environment variables that I might be able to set. I have python3 installed with brew and the
tasklib
library installed withpip3
(I believe). I'm totally unfamiliar with python environment and libraries so a hand would be greatly appreciated.