Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hook Error: Expected 1 JSON task(s), found 0, in hook script: on-modify.timewarrior, if a task description are large #15

Open
Erraen opened this issue Jan 21, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@Erraen
Copy link

Erraen commented Jan 21, 2021

on-modify.timewarrior hook are fault on large (10kB+) task description (redminedescription in my case, but I think it does not matter).
Adding a flush option to the output of the task fixes the problem:

print(json.dumps(new), flush=True)

Versions:
timewarrior - 1.4.2
OS - Debian 11
python - 3.9.1

@k4y4k
Copy link

k4y4k commented Mar 12, 2021

Yeah, this is happening to me too on any task brought in by bugwarrior (be it GitHub, GitLab, Trello, whatever), and I can confirm replacing https://github.com/GothenburgBitFactory/timewarrior/blob/c83d45bc0d47bb362e96edfb5cf44cabe1f0b6d9/ext/on-modify.timewarrior#L50 with

print(json.dumps(new), flush=True)

fixes the issue.

@lauft lauft added the bug Something isn't working label May 16, 2021
@lauft lauft transferred this issue from GothenburgBitFactory/timewarrior Apr 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants