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 5A7AE6DE0A9A for ; Sun, 14 Feb 2016 04:22:29 -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 ORlmMRsnt65U for ; Sun, 14 Feb 2016 04:22:27 -0800 (PST) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by arlo.cworth.org (Postfix) with ESMTPS id 519606DE0943 for ; Sun, 14 Feb 2016 04:22:27 -0800 (PST) Received: from remotemail by fethera.tethera.net with local (Exim 4.84) (envelope-from ) id 1aUvgO-0001GV-Ji; Sun, 14 Feb 2016 07:21:44 -0500 Received: (nullmailer pid 5814 invoked by uid 1000); Sun, 14 Feb 2016 12:22:24 -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: <20160214063132.GD4265@odin.tremily.us> References: <87oabko293.fsf@zancas.localnet> <20160213223357.GC4265@odin.tremily.us> <87ziv4813v.fsf@zancas.localnet> <20160214063132.GD4265@odin.tremily.us> User-Agent: Notmuch/0.21+26~g9404723 (http://notmuchmail.org) Emacs/24.5.1 (x86_64-pc-linux-gnu) Date: Sun, 14 Feb 2016 08:22:24 -0400 Message-ID: <87twlbv5vj.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 12:22:29 -0000 "W. Trevor King" writes: > On Sat, Feb 13, 2016 at 10:41:40PM -0400, David Bremner wrote: >> 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_stat= us >> index =3D _index_tags() >> File "/home/bremner/.config/scripts/nmbug.real", line 621, in _index_t= ags >> git.stdin.write(line) > > This traceback is pointing at what should be a stream write, so I > don't see how urllib is involved there at all. I guess this traceback > ends up in the =E2=80=9CBroken pipe=E2=80=9D message from your original p= ost? yes > > for tag in tags: > _LOG.debug('building a quoted path for {!r} / {!r}'.format(id, tag)) > path =3D 'tags/{id}/{tag}'.format( > id=3D_hex_quote(string=3Did), tag=3D_hex_quote(string=3Dtag)) > yield '{mode} {hash}\t{path}\n'.format(mode=3Dmode, hash=3Dhash, pa= th=3Dpath) > I think the problem is not a bad tag, but a bad message-id. The last line of output before the UnicodeWarning and the broken pipe is building a quoted path for u'D1B4DEBCAFFC4A05A4D4349A6EC5C9D8@\xd1\xe5\xf0\= xe3\xe5\xe9-\xcf\xca' / u'unread' this corresponds to id:D1B4DEBCAFFC4A05A4D4349A6EC5C9D8@=C3=91=C3=A5=C3=B0=C3=A3=C3=A5=C3= =A9-=C3=8F=C3=8A The original header looks like Message-ID: Visually I can't see what the encoding error might be, but I guess that doesn't matter; we should be able to handle message-ids as opaque byte strings. d