[PATCH v2 11/14] cli/reply: return internet address list from get header funcs
[notmuch-archives.git] / a1 / 5a69b4fc02221a0223a7e70f0eb63fde1e240e
1 Return-Path: <antoine.amarilli@ens.fr>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id 8DCA4429E21\r
6         for <notmuch@notmuchmail.org>; Sun,  6 Nov 2011 14:16:03 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_NONE=-0.0001] autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id i5qOAd0ILcoN for <notmuch@notmuchmail.org>;\r
16         Sun,  6 Nov 2011 14:16:02 -0800 (PST)\r
17 Received: from smtp6-g21.free.fr (smtp6-g21.free.fr [212.27.42.6])\r
18         by olra.theworths.org (Postfix) with ESMTP id A9340431FB6\r
19         for <notmuch@notmuchmail.org>; Sun,  6 Nov 2011 14:16:01 -0800 (PST)\r
20 Received: from clipper.ens.fr (unknown [82.225.2.66])\r
21         by smtp6-g21.free.fr (Postfix) with ESMTP id 20972822BD\r
22         for <notmuch@notmuchmail.org>; Sun,  6 Nov 2011 23:15:55 +0100 (CET)\r
23 From: Antoine Amarilli <antoine.amarilli@ens.fr>\r
24 To: notmuch@notmuchmail.org\r
25 Subject: python-notmuch decoding error on a message\r
26 Message-ID: <20111106221554.GA23240@clipper.ens.fr>\r
27 MIME-Version: 1.0\r
28 Content-Type: multipart/signed; micalg=pgp-sha1;\r
29         protocol="application/pgp-signature"; boundary="d9ADC0YsG2v16Js0"\r
30 Content-Disposition: inline\r
31 User-Agent: Mutt/1.5.21 (2010-09-15)\r
32 X-Mailman-Approved-At: Tue, 22 Nov 2011 08:49:56 -0800\r
33 X-BeenThere: notmuch@notmuchmail.org\r
34 X-Mailman-Version: 2.1.13\r
35 Precedence: list\r
36 List-Id: "Use and development of the notmuch mail system."\r
37         <notmuch.notmuchmail.org>\r
38 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
39         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
40 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
41 List-Post: <mailto:notmuch@notmuchmail.org>\r
42 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
43 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
44         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
45 Date: Sun, 06 Nov 2011 22:16:03 -0000\r
46 X-Original-Date: Sun, 6 Nov 2011 23:15:54 +0100\r
47 X-List-Received-Date: Sun, 06 Nov 2011 22:16:03 -0000\r
48 \r
49 \r
50 --d9ADC0YsG2v16Js0\r
51 Content-Type: multipart/mixed; boundary="96YOpH+ONegL0A3E"\r
52 Content-Disposition: inline\r
53 \r
54 \r
55 --96YOpH+ONegL0A3E\r
56 Content-Type: text/plain; charset=utf-8\r
57 Content-Disposition: inline\r
58 Content-Transfer-Encoding: quoted-printable\r
59 \r
60 Hello,\r
61 \r
62 The attached message makes python-notmuch crash when trying to access it (s=\r
63 ee\r
64 attached log).\r
65 \r
66 I don't know if the encoding of Subject is valid or not, but it would proba=\r
67 bly\r
68 be better anyway to ignore decoding errors and return some approximation of\r
69 Subject instead of failing like this.\r
70 \r
71 Any ideas?\r
72 \r
73 Thanks!\r
74 \r
75 --=20\r
76 Antoine Amarilli\r
77 \r
78 \r
79 --96YOpH+ONegL0A3E\r
80 Content-Type: text/plain; charset=utf-8\r
81 Content-Disposition: attachment; filename=log\r
82 Content-Transfer-Encoding: quoted-printable\r
83 \r
84 $ python\r
85 Python 2.7.2+ (default, Aug 16 2011, 09:23:59)=20\r
86 [GCC 4.6.1] on linux2\r
87 Type "help", "copyright", "credits" or "license" for more information.\r
88 >>> import notmuch\r
89 >>> db =3D notmuch.Database()\r
90 >>> q =3D db.create_query("id:test20110928121705.GA3877@example.com")\r
91 >>> t =3D q.search_threads()\r
92 >>> for a in t:\r
93 =2E..     print a\r
94 =2E..=20\r
95 Traceback (most recent call last):\r
96   File "<stdin>", line 2, in <module>\r
97   File "/usr/local/lib/python2.7/dist-packages/notmuch/thread.py", line 379=\r
98 , in __str__\r
99     thread['subject'] =3D self.get_subject()\r
100   File "/usr/local/lib/python2.7/dist-packages/notmuch/thread.py", line 311=\r
101 , in get_subject\r
102     return subject.decode('UTF-8')\r
103   File "/usr/lib/python2.7/encodings/utf_8.py", line 16, in decode\r
104     return codecs.utf_8_decode(input, errors, True)\r
105 UnicodeDecodeError: 'utf8' codec can't decode byte 0xe8 in position 6: inva=\r
106 lid continuation byte\r
107 >>>=20\r
108 \r
109 --96YOpH+ONegL0A3E\r
110 Content-Type: text/plain; charset=utf-8\r
111 Content-Disposition: attachment; filename=message\r
112 Content-Transfer-Encoding: quoted-printable\r
113 \r
114 Date: Wed, 28 Sep 2011 14:17:05 +0200\r
115 =46rom: nobody@example.com\r
116 To: nobody@example.com\r
117 Subject: Re: Fwd: =3D?utf-8?B?M+ht?=3D =3D?utf-8?Q?e?=3D Salon du Livre jur=\r
118 idique\r
119 Message-ID: <test20110928121705.GA3877@example.com>\r
120 MIME-Version: 1.0\r
121 Content-Type: multipart/signed; micalg=3Dpgp-sha1;\r
122         protocol=3D"application/pgp-signature"; boundary=3D"ZGiS0Q5IWpPtfppv"\r
123 Content-Disposition: inline\r
124 User-Agent: Mutt/1.5.21 (2010-09-15)\r
125 Content-Length: 865\r
126 Lines: 2\r
127 \r
128 test\r
129 \r
130 \r
131 --96YOpH+ONegL0A3E--\r
132 \r
133 --d9ADC0YsG2v16Js0\r
134 Content-Type: application/pgp-signature; name="signature.asc"\r
135 Content-Description: Digital signature\r
136 \r
137 -----BEGIN PGP SIGNATURE-----\r
138 Version: GnuPG v1.4.11 (GNU/Linux)\r
139 \r
140 iEYEARECAAYFAk63BxoACgkQfBQDNf0zFnp0VgCgqH0IQdzTon5gihEIml6Du9oV\r
141 t5gAnjmVeAqSQH4jVsrn5dvnJ6bPNHQi\r
142 =Y62A\r
143 -----END PGP SIGNATURE-----\r
144 \r
145 --d9ADC0YsG2v16Js0--\r