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

taskw.exceptions.TaskwarriorError: <exception str() failed> #850

Closed bbigras closed 2 years ago

bbigras commented 2 years ago

bugwarrior: 89bff55e533569b7390848f35b9dd95b552e50ae task: 2.6.1

I got this error with a couple of sources.

❯ ./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.496319s
INFO:bugwarrior.services:Working on [my_trello]
INFO:bugwarrior.services:Done with [my_trello] in 0.616134s
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 405, in synchronize
    _, task = tw.get_task(uuid=existing_taskwarrior_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: <exception str() failed>
jkaiser-ioki commented 2 years ago

Something very similar happens on my machine as well:

OS: Arch Linux taskwarrior: 2.6.1 bugwarrior: 1.8.0

only one configured service: gitlab (the instance in question is self-hosted)

trace:

[jonas@orchid ~]$ 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 1 workers.
INFO:bugwarrior.services:Working on [gitlab_ioki]
Traceback (most recent call last):
  File "/usr/bin/bugwarrior-pull", line 33, in <module>
    sys.exit(load_entry_point('bugwarrior==1.8.0', 'console_scripts', 'bugwarrior-pull')())
  File "/usr/lib/python3.10/site-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3.10/site-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3.10/site-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3.10/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/usr/lib/python3.10/site-packages/bugwarrior/command.py", line 73, in pull
    synchronize(issue_generator, config, main_section, dry_run)
  File "/usr/lib/python3.10/site-packages/bugwarrior/db.py", line 385, in synchronize
    _, task = tw.get_task(uuid=existing_taskwarrior_uuid)
  File "/usr/lib/python3.10/site-packages/taskw/warrior.py", line 626, in get_task
    task_id, task = self._load_task(**kw)
  File "/usr/lib/python3.10/site-packages/taskw/warrior.py", line 658, in _load_task
    task = self._get_task_objects('export', *search)
  File "/usr/lib/python3.10/site-packages/taskw/warrior.py", line 513, in _get_task_objects
    json = self._get_json(*args)
  File "/usr/lib/python3.10/site-packages/taskw/warrior.py", line 510, in _get_json
    return json.loads(self._execute(*args)[0])
  File "/usr/lib/python3.10/site-packages/taskw/warrior.py", line 484, in _execute
    raise TaskwarriorError(command, stderr, stdout, proc.returncode)
taskw.exceptions.TaskwarriorError: <exception str() failed>
INFO:bugwarrior.services:Done with [gitlab_ioki] in 106.308497s

Sidenote: I also don't get my command prompt back after the above trace, not sure if there is still something happening in the background, or whether the bugwarrior-pull command simply busy-hangs somewhere ...

jkaiser-ioki commented 2 years ago

Update: looks like the exception is coming from python-taskw ...

My OS ships python-taskw:1.3.0, though there appears to be a newer python-taskw:1.3.1 release (which in particular includes https://github.com/ralphbean/taskw/pull/152 that is supposed to add taskwarrior 2.6.0. compatibility).

Given that I am running a taskwarrior 2.6.1 with a python API wrapper library that does not yet include a fix for 2.6.0 compat ... could that be the source of the problem?

ryneeverett commented 2 years ago

Update: looks like the exception is coming from python-taskw ...

My OS ships python-taskw:1.3.0, though there appears to be a newer python-taskw:1.3.1 release (which in particular includes ralphbean/taskw#152 that is supposed to add taskwarrior 2.6.0. compatibility).

Given that I am running a taskwarrior 2.6.1 with a python API wrapper library that does not yet include a fix for 2.6.0 compat ... could that be the source of the problem?

Yes, I believe that is the case but have not confirmed it yet.

jkaiser-ioki commented 2 years ago

Arch Linux (AUR) just bumped python-taskw to 1.3.1, after which the above error is gone, so most likely that was the culprit.

hope that helps anyone else running into this :-)