From: David Bremner Date: Sun, 14 Feb 2016 02:41:40 +0000 (+2000) Subject: Re: problems with nmbug and empty prefix (UnicodeWarning and broken pipe) X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=6a089264cb755069c4e42caa04ff46fa7cc2d15a;p=notmuch-archives.git Re: problems with nmbug and empty prefix (UnicodeWarning and broken pipe) --- diff --git a/57/9acd03701109b416050743d1cd16ebe453fa35 b/57/9acd03701109b416050743d1cd16ebe453fa35 new file mode 100644 index 000000000..36ce8f28e --- /dev/null +++ b/57/9acd03701109b416050743d1cd16ebe453fa35 @@ -0,0 +1,91 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by arlo.cworth.org (Postfix) with ESMTP id 510E96DE0AF8 + for ; Sat, 13 Feb 2016 18:41:45 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: -0.307 +X-Spam-Level: +X-Spam-Status: No, score=-0.307 tagged_above=-999 required=5 tests=[AWL=0.244, + RP_MATCHES_RCVD=-0.55, SPF_PASS=-0.001] autolearn=disabled +Received: from arlo.cworth.org ([127.0.0.1]) + by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id OB-tYCJvNwCR for ; + Sat, 13 Feb 2016 18:41:43 -0800 (PST) +Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) + by arlo.cworth.org (Postfix) with ESMTPS id 358F26DE0A9A + for ; Sat, 13 Feb 2016 18:41:42 -0800 (PST) +Received: from remotemail by fethera.tethera.net with local (Exim 4.84) + (envelope-from ) + id 1aUmcO-0002eO-3T; Sat, 13 Feb 2016 21:41:00 -0500 +Received: (nullmailer pid 14258 invoked by uid 1000); + Sun, 14 Feb 2016 02:41:40 -0000 +From: David Bremner +To: "W. Trevor King" +Cc: notmuch@notmuchmail.org +Subject: Re: problems with nmbug and empty prefix (UnicodeWarning and broken + pipe) +In-Reply-To: <20160213223357.GC4265@odin.tremily.us> +References: <87oabko293.fsf@zancas.localnet> + <20160213223357.GC4265@odin.tremily.us> +User-Agent: Notmuch/0.21+26~g9404723 (http://notmuchmail.org) Emacs/24.5.1 + (x86_64-pc-linux-gnu) +Date: Sat, 13 Feb 2016 22:41:40 -0400 +Message-ID: <87ziv4813v.fsf@zancas.localnet> +MIME-Version: 1.0 +Content-Type: text/plain; charset=utf-8 +Content-Transfer-Encoding: quoted-printable +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.20 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Sun, 14 Feb 2016 02:41:45 -0000 + +"W. Trevor King" 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 + args.func(**kwargs) + File "/home/bremner/.config/scripts/nmbug.real", line 324, in commit + status =3D get_status() + File "/home/bremner/.config/scripts/nmbug.real", line 581, in get_status + index =3D _index_tags() + File "/home/bremner/.config/scripts/nmbug.real", line 621, in _index_tags + git.stdin.write(line) + +> We only call =E2=80=98notmuch dump =E2=80=A6=E2=80=99 from _index_tags, w= +here dump's stdout is +> tweaked and fed into =E2=80=98git update-index =E2=80=A6=E2=80=99. Your = +urllib UnicodeWarning +> suggests the issue lies in: +> +> tags =3D [ +> _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