From: W. Trevor King Date: Sat, 13 Feb 2016 22:33:57 +0000 (+1600) Subject: Re: problems with nmbug and empty prefix (UnicodeWarning and broken pipe) X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=57f83ab0f0f5a276a6b20030ec3f9ff84c7771f4;p=notmuch-archives.git Re: problems with nmbug and empty prefix (UnicodeWarning and broken pipe) --- diff --git a/0a/89426b569c881546f571922246d2aeb75ccd6a b/0a/89426b569c881546f571922246d2aeb75ccd6a new file mode 100644 index 000000000..a0335980a --- /dev/null +++ b/0a/89426b569c881546f571922246d2aeb75ccd6a @@ -0,0 +1,154 @@ +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 15E706DE0AF8 + for ; Sat, 13 Feb 2016 14:34:03 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: 0.007 +X-Spam-Level: +X-Spam-Status: No, score=0.007 tagged_above=-999 required=5 tests=[AWL=0.108, + DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, + RCVD_IN_DNSWL_NONE=-0.0001, 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 V7g9L4rlhmpy for ; + Sat, 13 Feb 2016 14:34:00 -0800 (PST) +Received: from resqmta-po-07v.sys.comcast.net (resqmta-po-07v.sys.comcast.net + [96.114.154.166]) + by arlo.cworth.org (Postfix) with ESMTPS id 876146DE0A9A + for ; Sat, 13 Feb 2016 14:34:00 -0800 (PST) +Received: from resomta-po-12v.sys.comcast.net ([96.114.154.236]) + by resqmta-po-07v.sys.comcast.net with comcast + id HyZw1s00456HXL001yZzdc; Sat, 13 Feb 2016 22:33:59 +0000 +Received: from mail.tremily.us ([73.221.72.168]) + by resomta-po-12v.sys.comcast.net with comcast + id HyZy1s0033dr3C901yZyuE; Sat, 13 Feb 2016 22:33:59 +0000 +Received: by mail.tremily.us (Postfix, from userid 1000) + id CE4DB1BB149D; Sat, 13 Feb 2016 14:33:57 -0800 (PST) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tremily.us; s=odin; + t=1455402837; bh=7GHqRXvYmYpQwbUNtjaYDRr5J5EVQCsTI4Z2p6mf6jk=; + h=Date:From:To:Cc:Subject:References:In-Reply-To; + b=T889iVGjuZ7nOAJtKfAXX6qWAP0ao8ExrhjBO3leD5SKK0k6Kf53rcOJRcFyVx5RN + qZJF0jmLX8pOSVlUOhncdQwXJPMMFrVrAOCK3vnhCvKX3nR/lZk8rfGjodftXhpvl/ + 8pGW1+wddyk3qrwqg9DIU7GekL14spOsxg5CFWLs= +Date: Sat, 13 Feb 2016 14:33:57 -0800 +From: "W. Trevor King" +To: David Bremner +Cc: notmuch@notmuchmail.org +Subject: Re: problems with nmbug and empty prefix (UnicodeWarning and broken + pipe) +Message-ID: <20160213223357.GC4265@odin.tremily.us> +References: <87oabko293.fsf@zancas.localnet> +MIME-Version: 1.0 +Content-Type: multipart/signed; micalg=pgp-sha1; + protocol="application/pgp-signature"; boundary="OHFW44Kv8gQ39vd8" +Content-Disposition: inline +In-Reply-To: <87oabko293.fsf@zancas.localnet> +OpenPGP: id=39A2F3FA2AB17E5D8764F388FC29BDCDF15F5BE8; + url=http://tremily.us/pubkey.txt +User-Agent: Mutt/1.5.23 (2014-03-12) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; + s=q20140121; t=1455402839; + bh=XfRzmKVUgx89vDSJCDfrjapU9QQiuImEDKht7tJTyC8=; + h=Received:Received:Received:Date:From:To:Subject:Message-ID: + MIME-Version:Content-Type; + b=gvIdFQi0yn5VoiN98kNMq0edOfOGkwuVk7SfGvdL0jcyu/DgI7BpRel/FJrBrEg5U + llhpoQX3dhFWJGo0AOFjYjp0l9zYCXW4DltsoNO8VRpln3keVf4OWtAyLge/+tZ0jG + ILL23ABUyd1lydX20sCdTBpHSM0WyVaIT3Z0rFU8rSFN0xP2FKd7Q2aIC7ztLEHds4 + h2SYAQWphcXtQ98vEzCVvC24eaC/MGfCY+boIK5KL60mVpR8hMLTGxarkR0TDatUxi + 8iN5MDoqqxCSXdQEh5oL4lmX7MH+ZHR5KZrImoQFtHfEm1Tx5nqfKIa47WQTWXbmjG + mm6KkICfgDfhg== +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: Sat, 13 Feb 2016 22:34:03 -0000 + + +--OHFW44Kv8gQ39vd8 +Content-Type: text/plain; charset=utf-8 +Content-Disposition: inline +Content-Transfer-Encoding: quoted-printable + +On Sat, Feb 13, 2016 at 03:10:16PM -0400, David Bremner wrote: +> bremner@zancas:~$ export NMBGIT=3D/tmp/nmbug +> bremner@zancas:~$ export NMBPREFIX=3D"" +> bremner@zancas:~$ nmbug commit +> /usr/lib/python2.7/urllib.py:1303: UnicodeWarning: Unicode equal comparis= +on failed to convert both arguments to Unicode - interpreting them as being= + unequal +> return ''.join(map(quoter, s)) +> Error flushing output: : Broken pipe +> [u'notmuch', u'dump', u'--format=3Dbatch-tag', u'--', u''] exit= +ed with 254 + +I couldn't reproduce this in either Python 3.4.3 or 2.7.10. It might +be your number-of-tags hypothesis, but the UnicodeWarning suggests an +encoding issue involving the dump output, which might mean that you +just have a strange tag. Can you try again with: + + $ nmbug --log-level debug commit + +which will give us the full traceback. + +We only call =E2=80=98notmuch dump =E2=80=A6=E2=80=99 from _index_tags, whe= +re dump's stdout is +tweaked and fed into =E2=80=98git update-index =E2=80=A6=E2=80=99. Your ur= +llib UnicodeWarning +suggests the issue lies in: + + tags =3D [ + _unquote(tag[len(prefix):]) + for tag in tags_string.split() + if tag.startswith(prefix)] + +in which case it would be useful to try something like: + + tags =3D [] + for tag in tags_string.split(): + try: + if tag.startswith(prefix): + tags.append(_unquote(tag[len(prefix):])) + except UnicodeWarning as error: + raise ValueError('{!r} ({!r}, {})'.format(tag, prefix, error)) + +Cheers, +Trevor + +--=20 +This email may be signed or encrypted with GnuPG (http://www.gnupg.org). +For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy + +--OHFW44Kv8gQ39vd8 +Content-Type: application/pgp-signature; name="signature.asc" +Content-Description: OpenPGP digital signature + +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2 + +iQIcBAEBAgAGBQJWv69TAAoJEAPqygegUbGszXAP/R+P3aTgDj/wHoIY3MYvD6nW +tiz3nr9ifpz1j4RQruMuL69Kf+zAJfifkvHQUxV3Si7eAJV0jD36IhgwmfE2NGVN +ZlGxnr33Ry0orqY7FXLDp+U/Sk4JyjnaAUbYSg0mIByfl2wFB8thcAsZ4W6gGQYc +LpF3BsHV3uoTEU6D1xUv6vLecBMHSOawbEMr66y7ACfaU67ua2eoyJQmOEfi7p1N +9Absy31ovw0BrWb9zYs4I5Zg2fWXL9gv67XUFD3lG2adu44LaNuO6IXcAgF/LTy8 +su9+gPQA22bYmJpaUpJ0o8s0rwhJqaM56H7WdOANoXkAFYxITyBuRI4qGHxpGlaH +8FWLa7reYvjTbUMC0s7iJ79GEMhAT0t5F30NT3M+eu2lQOQE5h6do3mbF7UO4T8q +uSkr71ADU++r4xL7MryBZ9g17XN/8dfp0NVllOII95ZwBV1R4Jv0zcNNwVzjDDxz +5BU632OZYK5XzNt/28SsIEo4H5pO0K230PCJ9VzFPdKlq3k7rltwzOUkwKHvSfou +/3Lu6X88k9YbaU91D772N03LVKNaAt8F9pumvqNk3zKF6nt+KRyEIdIVoCfdDfPn +6mwtoNyesgrbF9ypBDEynHYwX3J80wJfOYv9alg3hK6PxS1CwFrfYDPXhNMXcx23 +VCO0PFdGY5a1Tt5waR3A +=D2Ya +-----END PGP SIGNATURE----- + +--OHFW44Kv8gQ39vd8--