kostajh / taskwarrior-time-tracking-hook

A simple Taskwarrior hook allowing one to track total time spent on a task.
138 stars 24 forks source link

Error when using task start #6

Closed nielsene54 closed 9 years ago

nielsene54 commented 9 years ago

Hey, when I use task start I get this error:

Taskwarrior no longer supports file format 1, originally used between 27 November 2006 and 31 December 2007.

I am using 0.1.4 of this time tracking hook and Taskwarrior 2.4.0.beta3.

nielsene54 commented 9 years ago

I found the reason for this in developing my own hook. In your code you do return json.dumps(modified). The problem is that json.dumps() adds white spaces between keys and values, but Taskwarrior is not expecting that. So I think if you instead did:

return json.dumps(modified, separators=(',',':'))

then this would work again. At least that is what fixed my hook.

saravanak commented 9 years ago

Hi I have assembled a pull request for this small change.I almost lost about 2 hours debugging this one. Hence thought it might be useful for others..

nielsene54 commented 9 years ago

Awesome :+1: