Comments (8)
I'll try to look into this in the evening.
from taskpirate.
@kaushikgopal Could you reproduce the problem having set debug.hooks
configuration setting to 2
. (i.e using rc.debug.hooks=2
override)? This will give us the underlying info what's happening between task and the hook script.
from taskpirate.
Sorry only noticed the message now. I tried this again after updating some libs (from a previous issue) and am getting a slightly different error now. Here's some additional information:
# task diag
task 2.6.1
Platform: Darwin
Compiler
Version: Apple LLVM 13.0.0 (clang-1300.0.29.3)
Caps: +stdc +stdc_hosted +LP64 +c8 +i32 +l64 +vp64 +time_t64
Compliance: C++17
Build Features
CMake: 3.21.3
libuuid: libuuid + uuid_unparse_lower
libgnutls: 3.6.16
Build type: Release
Configuration
File: ~/.config/task/taskrc (found), 2363 bytes, mode 100644
Data: ~/.data/task/ (found), dir, mode 40755
Locking: Enabled
GC: Enabled
$VISUAL: nvim
Server: app.wingtask.com:53589
//....
Hooks
System: Enabled
Location: ~/.config/task/hooks/
Active: on-add-pirate (executable)
on-exit-sync.sh (executable)
on-modify-pirate (executable)
Inactive:
Tests
Terminal: 237x110
Dups: Scanned 768 tasks for duplicate UUIDs:
No duplicates found
Broken ref: Scanned 768 tasks for broken references:
No broken references found
Sample of what i tried:
# task rc.debug.hooks=2 add "expensify Home Internet & Cell Phone Reimbursement [prev month] (30 days)" project:fin recur:monthly due:sonm+15d until:due+28d
Timer Config::load (~/.config/task/taskrc) 0.000549 sec
No context set
Found hook script ~/.config/task/hooks//on-add-pirate
Found hook script ~/.config/task/hooks//on-exit-sync.sh
Found hook script ~/.config/task/hooks//on-modify-pirate
MODIFICATION project <-- 'fin'
MODIFICATION recur <-- 'monthly'
MODIFICATION due <-- '1637046000' <-- '2021-11-15T23:00:00' <-- 'sonm+15d'
MODIFICATION until <-- '1639465200' <-- '2021-12-13T23:00:00' <-- 'due+28d'
MODIFICATION description <-- 'expensify Home Internet & Cell Phone Reimbursement [prev month] (30 days)'
Hook: Calling ~/.config/task/hooks//on-add-pirate
Hook: input
{"description":"expensify Home Internet & Cell Phone Reimbursement [prev month] (30 days)","due":"20211116T070000Z","entry":"20211028T160825Z","modified":"20211028T160825Z","project":"fin","recur":"monthly","rtype":"periodic","status":"recurring","until":"20211214T070000Z","uuid":"a36be048-e3e3-459b-9897-8429735d50e3"}
Hooks: args
api:2
args:task rc.debug.hooks=2 add expensify Home Internet & Cell Phone Reimbursement [prev month] (30 days) project:fin recur:monthly due:sonm+15d until:due+28d
command:add
rc:~/.config/task/taskrc
data:~/.data/task/
version:2.6.1
Timer Hooks::execute (~/.config/task/hooks//on-add-pirate) 0.151386 sec
Hook: output
{"description":"expensify Home Internet & Cell Phone Reimbursement [prev month] (30 days)","due":"20211116T070000Z","entry":"20211028T160825Z","modified":"20211028T160825Z","project":"fin","recur":"monthly","rtype":"periodic","status":"recurring","until":"20211214T070000Z","uuid":"a36be048-e3e3-459b-9897-8429735d50e3"}
Hook: Completed with status 0
pending.data rw O T0301+001~000-000 L0300+000
completed.data rw - T0468+000~000-000 L0468+000
undo.data rw O T0000+000~000-000 L0003+003
backlog.data rw O T0000+000~000-000 L0001+001
Hook: Calling ~/.config/task/hooks//on-exit-sync.sh
Hook: input
{"description":"expensify Home Internet & Cell Phone Reimbursement [prev month] (30 days)","due":"20211116T070000Z","entry":"20211028T160825Z","modified":"20211028T160825Z","project":"fin","recur":"monthly","rtype":"periodic","status":"recurring","until":"20211214T070000Z","uuid":"a36be048-e3e3-459b-9897-8429735d50e3"}
Hooks: args
api:2
args:task rc.debug.hooks=2 add expensify Home Internet & Cell Phone Reimbursement [prev month] (30 days) project:fin recur:monthly due:sonm+15d until:due+28d
command:add
rc:~/.config/task/taskrc
data:~/.data/task/
version:2.6.1
Timer Hooks::execute (~/.config/task/hooks//on-exit-sync.sh) 0.005306 sec
Hook: output
Hook: Completed with status 0
Perf task 2.6.1 - 20211028T160825Z init:2328 load:12244 gc:0 filter:0 commit:18127 sort:0 render:0 hooks:157020 other:15110 total:192585
Created task 301 (recurrence template).
Configuration override rc.debug.hooks=2
The project 'fin' has changed. Project 'fin' is 48% complete (18 of 35 tasks remaining).
# task --rc.debug.hooks=2
Traceback (most recent call last):
File "~/.config/task/hooks//on-add-pirate", line 46, in <module>
hook(task)
File "~/.config/task/hooks/shift-recurrence/pirate_add_shift_recurrence.py", line 25, in hook_shift_recurrence
parent = tw.tasks.get(uuid=task['parent']['uuid'])
File "~/Library/Python/3.9/lib/python/site-packages/tasklib/task.py", line 552, in get
raise Task.DoesNotExist(
tasklib.task.DoesNotExist: Task matching query does not exist. Lookup parameters were {'uuid': 'a36be048-e3e3-459b-9897-8429735d50e3'}
Hook Error: Expected feedback from failing hook script: on-add-pirate
So interestingly, it looks like my tasklib is misconfigured again?
# pip3 show tasklib
Name: tasklib
Version: 2.4.2
Summary: Official Taskwarrior library for Python
Home-page: https://github.com/GothenburgBitFactory/tasklib
Author: GothenburgBitFactory
Author-email: [email protected]
License: BSD
Location: ~/Library/Python/3.9/lib/python/site-packages
Requires: tzlocal, pytz
Required-by:
I'm on 2.4.2 though which i thought would be ok. I upgraded to 2.4.3
Name: tasklib
Version: 2.4.3
Summary: Official Taskwarrior library for Python
Home-page: https://github.com/GothenburgBitFactory/tasklib
Author: GothenburgBitFactory
Author-email: [email protected]
License: BSD
Location: ~/Library/Python/3.9/lib/python/site-packages
Requires: tzlocal, pytz
Required-by:
But no dice, i seem to be getting the same error.
from taskpirate.
So reading that error message
tasklib.task.DoesNotExist: Task matching query does not exist. Lookup parameters were {'uuid': 'a36be048-e3e3-459b-9897-8429735d50e3'}
made me realize it might be because the task doesn't exist, but it does (just as a recurring template):
# task info a36be048
Name Value
ID 301
Description expensify Home Internet & Cell Phone Reimbursement [prev month] (30 days)
Status Recurring
Project fin
Recurrence monthly
Recurrence type periodic
Entered 2021-10-28 09:08:25 (8min)
Due 2021-11-15 23:00:00
Until 2021-12-13 23:00:00
Last modified 2021-10-28 09:08:25 (8min)
Virtual tags LATEST PROJECT QUARTER UNBLOCKED UNTIL YEAR
UUID a36be048-e3e3-459b-9897-8429735d50e3
Urgency 3.4
project 1 * 1 = 1
due 0.2 * 12 = 2.4
------
3.4
from taskpirate.
Tasklib version is OK. I think this is a race condition on the DB, the content of the files might not be synced to the disk yet, and that's why query for the UUID of the newly created task failed.
from taskpirate.
hmm.. this happens almost consistently (for me).
i know i'm sounding like a crazy person at this point, but i started to see a lot of these problems arise after my move to the $XDG_
folder system.
i reverted my data.location
(and .taskrc
for good measure) locations and tried the same commands again ... and it worked.
only variable is i also disabled two of my other hooks (on-exit-sync and time-warrior), so those are the only other variables i can think of.
from taskpirate.
I have just switched to taskpirate and been very impressed with the speed uplift -- I had quite a few hooks which were importing tasklib.
I'm also seeing this issue when running task undo
. The issue seems to stem from the fact that at some point in the 2.6.0 processing the task is None
.
from taskpirate.
I can confirm. I get the following when undoing an add command:
The last modification was made 2022-05-28
Prior Values Current Values
description Testing task pirate
due 2022-05-28
entry 2022-05-28
modified 2022-05-28
status pending
uuid 77e6411f-c941-4949-a95d-295ed2744bae
The undo command is not reversible. Are you sure you want to revert to the previous state? (yes/no) yes
Timer Config::load (/home/testuser/.taskrc) 0.000558 sec
Found hook script /home/testuser/.task/hooks/on-add-pirate
Found hook script /home/testuser/.task/hooks/on-modify-pirate
Hook: Calling /home/testuser/.task/hooks/on-modify-pirate
Hook: input
{"description":"Testing task pirate","due":"20220528T170000Z","entry":"20220528T152542Z","modified":"20220528T152542Z","status":"pending","uuid":"77e6411f-c941-4949-a95d-295ed2744bae"}
{}
Hooks: args
api:2
args:task undo rc.debug.hooks=2
command:undo
rc:/home/testuser/.taskrc
data:/home/testuser/.task
version:2.6.1
Timer Hooks::execute (/home/testuser/.task/hooks/on-modify-pirate) 0.057345 sec
Hook: output
{}
Hook: Completed with status 0
Configuration override rc.debug.hooks=2
Hook Error: Expected 1 JSON task(s), found 0, in hook script: on-modify-pirate
When tasklib
is processing the above input the values of self._data
of the Task
instance become None
as mentioned by @williamjameshandley. Exporting this Task
instance then prints {}
. But I have the feeling that this is not a problem caused by taskpirate
nor tasklib
as the output of the hook equals the modified task input of {}
.
@tbabej might this be a bug on the site of taskwarriors hook system?
My taskwarrior version: 2.6.1 (112ac54a5)
from taskpirate.
Related Issues (12)
- shebang shouldn't use absulate path to python HOT 1
- Output feedback text HOT 1
- taskpirate uses deprecated imp HOT 2
- Is it supposed to work with python 2? HOT 1
- Taskpirate modifies tag format HOT 1
- Timezone offset does not match system offset HOT 1
- Problems with Unicode HOT 1
- Hook Error: Expected feedback from failing hook script (when using $XDG) HOT 4
- Getting errors in hook when running task command from an external script HOT 1
- I think install instructions are outdated HOT 1
- Tasklib still incompatible with default timewarrior hook HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from taskpirate.