Re: problems with nmbug and empty prefix (UnicodeWarning and broken pipe)

Subject: Re: problems with nmbug and empty prefix (UnicodeWarning and broken pipe)

Date: Sat, 13 Feb 2016 22:41:40 -0400

To: W. Trevor King

Cc: notmuch@notmuchmail.org

From: David Bremner


"W. Trevor King" <wking@tremily.us> writes:

>
>   $ nmbug --log-level debug commit
>
> which will give us the full traceback.
>

Traceback (most recent call last):
  File "/home/bremner/.config/scripts/nmbug.real", line 834, in <module>
    args.func(**kwargs)
  File "/home/bremner/.config/scripts/nmbug.real", line 324, in commit
    status = get_status()
  File "/home/bremner/.config/scripts/nmbug.real", line 581, in get_status
    index = _index_tags()
  File "/home/bremner/.config/scripts/nmbug.real", line 621, in _index_tags
    git.stdin.write(line)

> We only call ‘notmuch dump …’ from _index_tags, where dump's stdout is
> tweaked and fed into ‘git update-index …’.  Your urllib UnicodeWarning
> suggests the issue lies in:
>
>   tags = [
>       _unquote(tag[len(prefix):])
>       for tag in tags_string.split()
>       if tag.startswith(prefix)]

Looking at the source for urllib, that line is actually in quote, which
is called only from _hex_quote

It turns out I only have a problem with python2.7; python3.4 completes
the commit. At a guess, that suggests a unicode problem of some kind.
Unfortunately despite my best efforts with filterwarnings, I couldn't
figure out how to get a stack trace for that UnicodeWarning.

d

Thread: