taskwarrior-tui: Unable to parse output error

Describe the bug

Fresh install on mac works, but after synchronising it with my arch linux through https://inthe.am opening taskwarrior-tui throws this error.

Unable to parse output of `"task" "rc.json.array=on" "rc.confirmation=off" "rc.json.depends.array=on" "rc.report.next.filter=status:pending -WAITING limit:page" "export" "next"`:

If I switch to an empty context it doesn’t complain.

To Reproduce

Steps to reproduce the behavior:

Environment (please complete the following information):

  • Operating System: Mac 10.15.7
  • Installation: homebrew
  • taskwarrior-tui version: 0.18.5
  • task version: 2.6.1

Additional context and information

Log: 2022-02-06 19:46:20 | INFO | src/app.rs:1633 | Running `"task" "rc.json.array=on" "rc.confirmation=off" "rc.json.depends.array=on" "rc.report.next.filter=status:pending -WAITING limit:page" "export" "next"

I don’t know if I’m missing something. Anything else you need to debug this just let me know 😃 Works fine on my arch linux install, so I’m a bit lost with this error 🙄

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Comments: 18 (5 by maintainers)

Most upvoted comments

I stepped through and checked each task individually. This caused the issue:

[{"id": 43, "description": "anon description", "entry": "20220206T015846Z", "intheamtrelloboardid": "anontrelloboardid", "intheamtrelloid": "anontrelloid", "modified": "20220206T040521Z", "project": "packing", "status": "pending", "uuid": "ff2eea0b-6d61-4714-8293-476f661c26f8", "tags": ["nomad"], "depends": ["[\"5cb408df-41a9-411d-bc6c-c7da91621495\"]"], "urgency": 1.81096}]

When I remove the depends key and value and then reimport the blob, it works again.

Helper script:

#!/usr/bin/env python

import json
import sys
import subprocess
import shlex

if __name__ == '__main__':
    filename = sys.argv[1]
    with open(filename, 'r') as f:
        data = json.load(f)

    for i, task in enumerate(data):
        with open(f'tasks/{i}.json', 'w') as f:
            json.dump([task], f)
        subprocess.run(shlex.split("rm -rf .task .cache .local"))
        subprocess.run(shlex.split(f"task import tasks/{i}.json"))
        print(f"Imported task: {json.dumps([task])}")
        input("Check taskwarrior-tui, then press enter to continue")