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

AttributeError: 'NoneType' object has no attribute 'group' #805

Closed k4y4k closed 2 years ago

k4y4k commented 3 years ago

howdy :wave:

got this after upgrading to solve a UUID issue:

Traceback (most recent call last):
  File "/home/kayak/.local/bin/bugwarrior-pull", line 8, in <module>
    sys.exit(pull())
  File "/usr/lib/python3.9/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3.9/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3.9/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3.9/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/kayak/.local/lib/python3.9/site-packages/bugwarrior/command.py", line 73, in pull
    synchronize(issue_generator, config, main_section, dry_run)
  File "/home/kayak/.local/lib/python3.9/site-packages/bugwarrior/db.py", line 422, in synchronize
    new_task = tw.task_add(**issue)
  File "/home/kayak/.local/lib/python3.9/site-packages/taskw/warrior.py", line 697, in task_add
    task['uuid'] = re.search(UUID_REGEX, stdout).group(0)
AttributeError: 'NoneType' object has no attribute 'group'

and all I can say is: "what?"

Python: 3.9.1 task: 2.5.3 bugwarrior: 1.8.0 Arch Linux, fully updated.

Do I have to nuke my task install or?

ryneeverett commented 3 years ago

If I'm remembering correctly I think this may be caused by a regression in taskwarrior 2.5.2. You might try downgrading taskwarrior to 2.5.1.

k4y4k commented 3 years ago

Epic. Now it's working. Cheers!

bjakubiak commented 3 years ago

I have the same issue with jira service, taskwarrior version is 2.5.3 How about reopening the issue?

k4y4k commented 3 years ago

Sure thing, homeslice 😎

BUT, @bjakubiak, is there any reason you can't just grab / compile taskwarrior 2.5.1? Compiling is pretty simple / doesn't take too long, if you're a bit sketch on the idea

ryneeverett commented 3 years ago

For the record, I don't think there's anything to be done in bugwarrior for this. I believe the upstream bug is https://github.com/GothenburgBitFactory/taskwarrior/issues/1953 and a workaround is https://github.com/ralphbean/taskw/pull/141. At this point I plan to continue using 2.5.1 until there's some movement on one of these issues.

ryneeverett commented 3 years ago

Thought I'd loop in @pjf as he opened that upstream issue.

robrecord commented 3 years ago

When you say "a workaround is ralphbean/taskw#141", is that something that we users can do? I have everything installed with homebrew so downgrading isn't a nice clean option.

ryneeverett commented 3 years ago

@robrecord Yeah, it needs to be addressed at the package manager level. I personally can give no guidance on homebrew.

robrecord commented 3 years ago

Thank you @ryneeverett. I have uninstalled and built the recommended version from source.

vEnhance commented 2 years ago

In case it helps anyone else, I found it easier to update the python taskw library to the development version than to downgrade/recompile taskwarrior to the much older 2.5.1; since ralphbean/taskw#147 got merged this works around the issue for now as well.

pip install https://github.com/ralphbean/taskw@develop

tbabej commented 2 years ago

Since this is pinned - I'll chime in here that running the above command from @vEnhance is necessary to get compatibility with 2.6.0 release as well:

pip3 install -U https://github.com/ralphbean/taskw@develop