GothenburgBitFactory / bugwarrior

Pull github, bitbucket, and trac issues into taskwarrior
http://pypi.python.org/pypi/bugwarrior
GNU General Public License v3.0
734 stars 209 forks source link

ERROR:bugwarrior.db:Unable to add task: b"Unable to find report that matches '57e8d5d4-7235-41b5-8d5f-68ea2fe86272'." #851

Open bbigras opened 2 years ago

bbigras commented 2 years ago

bugwarrior: 89bff55e533569b7390848f35b9dd95b552e50ae task: 2.6.1

With possibly a fresh taskwarrior database.

❯ ./result/bin/bugwarrior-pull
INFO:bugwarrior.db:Service-defined UDAs exist: you can optionally use the `bugwarrior-uda` command to export a list of UDAs you can add to your taskrc file.
INFO:bugwarrior.services:Starting to aggregate remote issues.
INFO:bugwarrior.services:Spawning 2 workers.
INFO:bugwarrior.services:Working on [my_gmail]
INFO:bugwarrior.services.gmail:Starting authentication for my_gmail
INFO:bugwarrior.services:Done with [my_gmail] in 0.448752s
INFO:bugwarrior.services:Working on [my_trello]
INFO:bugwarrior.services:Done with [my_trello] in 0.555340s
INFO:bugwarrior.services:Done aggregating remote issues.
INFO:bugwarrior.db:Adding 1 tasks
INFO:bugwarrior.db:Adding task (bw)#1 - fix server .. https://trello.com/c/something
ERROR:bugwarrior.db:Unable to add task: b"Unable to find report that matches '57e8d5d4-7235-41b5-8d5f-68ea2fe86272'."
Traceback (most recent call last):
  File "/nix/store/vswhwwm1ra2lc3hs0189ddh70q1axs92-python3.9-bugwarrior-git-2021-11-03/lib/python3.9/site-packages/bugwarrior/db.py", line 455, in synchronize
    new_task = tw.task_add(**issue)
  File "/nix/store/vw25x6660ah6zrs5kl1nqm3crzacp4lj-python3.9-taskw-1.3.0/lib/python3.9/site-packages/taskw/warrior.py", line 699, in task_add
    id, added_task = self.get_task(uuid=task['uuid'])
  File "/nix/store/vw25x6660ah6zrs5kl1nqm3crzacp4lj-python3.9-taskw-1.3.0/lib/python3.9/site-packages/taskw/warrior.py", line 626, in get_task
    task_id, task = self._load_task(**kw)
  File "/nix/store/vw25x6660ah6zrs5kl1nqm3crzacp4lj-python3.9-taskw-1.3.0/lib/python3.9/site-packages/taskw/warrior.py", line 658, in _load_task
    task = self._get_task_objects('export', *search)
  File "/nix/store/vw25x6660ah6zrs5kl1nqm3crzacp4lj-python3.9-taskw-1.3.0/lib/python3.9/site-packages/taskw/warrior.py", line 513, in _get_task_objects
    json = self._get_json(*args)
  File "/nix/store/vw25x6660ah6zrs5kl1nqm3crzacp4lj-python3.9-taskw-1.3.0/lib/python3.9/site-packages/taskw/warrior.py", line 510, in _get_json
    return json.loads(self._execute(*args)[0])
  File "/nix/store/vw25x6660ah6zrs5kl1nqm3crzacp4lj-python3.9-taskw-1.3.0/lib/python3.9/site-packages/taskw/warrior.py", line 484, in _execute
    raise TaskwarriorError(command, stderr, stdout, proc.returncode)
taskw.exceptions.TaskwarriorError: <unprintable TaskwarriorError object>
Traceback (most recent call last):
  File "/nix/store/vswhwwm1ra2lc3hs0189ddh70q1axs92-python3.9-bugwarrior-git-2021-11-03/bin/.bugwarrior-pull-wrapped", line 9, in <module>
    sys.exit(pull())
  File "/nix/store/z38z43lgqnscxaz1jlr9gbccrhyv4dn8-python3.9-click-8.0.3/lib/python3.9/site-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/nix/store/z38z43lgqnscxaz1jlr9gbccrhyv4dn8-python3.9-click-8.0.3/lib/python3.9/site-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/nix/store/z38z43lgqnscxaz1jlr9gbccrhyv4dn8-python3.9-click-8.0.3/lib/python3.9/site-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/nix/store/z38z43lgqnscxaz1jlr9gbccrhyv4dn8-python3.9-click-8.0.3/lib/python3.9/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/nix/store/vswhwwm1ra2lc3hs0189ddh70q1axs92-python3.9-bugwarrior-git-2021-11-03/lib/python3.9/site-packages/bugwarrior/command.py", line 73, in pull
    synchronize(issue_generator, config, main_section, dry_run)
  File "/nix/store/vswhwwm1ra2lc3hs0189ddh70q1axs92-python3.9-bugwarrior-git-2021-11-03/lib/python3.9/site-packages/bugwarrior/db.py", line 461, in synchronize
    seen_uuids.add(new_task['uuid'])
UnboundLocalError: local variable 'new_task' referenced before assignment
ryneeverett commented 2 years ago

The second exception is not the cause of your issue but I am glad you caught it. I pushed #854 to fix it.

The first exception should be the focus of this issue but seems to be obscured by the unprintability of the exception. I suspect this is related to ralphbean/taskw#125 and ralphbean/taskw#126.

ryneeverett commented 2 years ago

Now I'm thinking this could be more closely related to ralphbean/taskw/issues/153.

ryneeverett commented 2 years ago

Note the similar unprintable exception in #733. However, this seems like it may be a separate issue.