1 Return-Path: <wking@tremily.us>
\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 85EE2431FC2
\r
6 for <notmuch@notmuchmail.org>; Sun, 29 Mar 2015 09:39:05 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=2.338 tagged_above=-999 required=5
\r
12 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
\r
13 DNS_FROM_AHBL_RHSBL=2.438, RCVD_IN_DNSWL_NONE=-0.0001]
\r
15 Received: from olra.theworths.org ([127.0.0.1])
\r
16 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
17 with ESMTP id dOZ1PH1xt+k3 for <notmuch@notmuchmail.org>;
\r
18 Sun, 29 Mar 2015 09:39:02 -0700 (PDT)
\r
19 Received: from resqmta-ch2-09v.sys.comcast.net
\r
20 (resqmta-ch2-09v.sys.comcast.net [69.252.207.41])
\r
21 (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))
\r
22 (No client certificate requested)
\r
23 by olra.theworths.org (Postfix) with ESMTPS id 4B048431FAE
\r
24 for <notmuch@notmuchmail.org>; Sun, 29 Mar 2015 09:39:02 -0700 (PDT)
\r
25 Received: from resomta-ch2-01v.sys.comcast.net ([69.252.207.97])
\r
26 by resqmta-ch2-09v.sys.comcast.net with comcast
\r
27 id 9Udb1q00826dK1R01Uf1hm; Sun, 29 Mar 2015 16:39:01 +0000
\r
28 Received: from odin.tremily.us ([67.168.81.176])
\r
29 by resomta-ch2-01v.sys.comcast.net with comcast
\r
30 id 9Ucz1q0063oF5yT01UczZJ; Sun, 29 Mar 2015 16:37:01 +0000
\r
31 Received: by odin.tremily.us (Postfix, from userid 1000)
\r
32 id 344AD16F724D; Sun, 29 Mar 2015 09:36:58 -0700 (PDT)
\r
33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tremily.us; s=odin;
\r
34 t=1427647018; bh=cMWZiFbLowP+ASopR1kvaZLYYxWy+p8Vk5vEAWwpIRc=;
\r
35 h=Date:From:To:Cc:Subject:References:In-Reply-To;
\r
36 b=RlzYHFSTHzsPOHOD1GKBqPQ+kKia7Zi2779THSjwpv1Y1kf57hlVuysus7S9uUfvb
\r
37 IKlnA5GR4KBHLc67qPbC7zGMSa2Ofh18i7XsW9+p9ztvov+HCaRCx0A2SO7euPTzhu
\r
38 WzKPAi/RLTSSPb4YqvJBny1BcyPXbnP7XLABrGK8=
\r
39 Date: Sun, 29 Mar 2015 09:36:58 -0700
\r
40 From: "W. Trevor King" <wking@tremily.us>
\r
41 To: Sebastian Fischmeister <sfischme@uwaterloo.ca>
\r
42 Subject: Re: UnicodeDecodeError with python API
\r
43 Message-ID: <20150329163658.GK22036@odin.tremily.us>
\r
44 References: <874mp4q7e7.fsf@uwaterloo.ca>
\r
46 Content-Type: multipart/signed; micalg=pgp-sha1;
\r
47 protocol="application/pgp-signature"; boundary="P8VDRTGkfyc6BSVj"
\r
48 Content-Disposition: inline
\r
49 In-Reply-To: <874mp4q7e7.fsf@uwaterloo.ca>
\r
50 OpenPGP: id=39A2F3FA2AB17E5D8764F388FC29BDCDF15F5BE8;
\r
51 url=http://tremily.us/pubkey.txt
\r
52 User-Agent: Mutt/1.5.23 (2014-03-12)
\r
53 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net;
\r
54 s=q20140121; t=1427647141;
\r
55 bh=vHyaNQMLHyT3aM26hQwl5+2RVsLu3r3Rx4JFDdKoy5U=;
\r
56 h=Received:Received:Received:Date:From:To:Subject:Message-ID:
\r
57 MIME-Version:Content-Type;
\r
58 b=C8FN9hmtgEMnOooSI1UIHlwaniIkckokQVwXmdkYuozutqgzT7foiCGvEI4su9J7S
\r
59 0snUEsjIBBu1I2Hpm0ZgzMogFn87jYIwQLKPj6uqoSBxj8gJDmTgCXaqWNcP1kI1WA
\r
60 4GjdjDs7NRT3cu5/O19GF22RY1KsVMzpwfgS7jIGk2AtQBS4dwEt3oxjNIYaou6oOH
\r
61 XSEl16m3z58fwWbaT1QE2mDmV1RKIDX9YKdWz0lAwqroQqqtOpb+PYE98V+WWcS8+o
\r
62 eqjf5yfEcM3CmjKtTYvARGG9zfetG9AEdiTW96O8+Hy1aKc6ACgRG3jUtoqqN4DA83
\r
64 Cc: notmuch <notmuch@notmuchmail.org>
\r
65 X-BeenThere: notmuch@notmuchmail.org
\r
66 X-Mailman-Version: 2.1.13
\r
68 List-Id: "Use and development of the notmuch mail system."
\r
69 <notmuch.notmuchmail.org>
\r
70 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
71 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
72 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
73 List-Post: <mailto:notmuch@notmuchmail.org>
\r
74 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
75 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
76 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
77 X-List-Received-Date: Sun, 29 Mar 2015 16:39:05 -0000
\r
81 Content-Type: text/plain; charset=utf-8
\r
82 Content-Disposition: inline
\r
83 Content-Transfer-Encoding: quoted-printable
\r
85 On Sun, Mar 29, 2015 at 09:08:28AM -0400, Sebastian Fischmeister wrote:
\r
86 > Traceback (most recent call last):
\r
87 > File "./test.py", line 66, in <module>
\r
88 > print(type(y.get_part(1)))
\r
90 > File "/usr/lib/python3.4/email/parser.py", line 54, in parse
\r
91 > data =3D fp.read(8192)
\r
92 > File "/usr/lib/python3.4/encodings/ascii.py", line 26, in decode
\r
93 > return codecs.ascii_decode(input, self.errors)[0]
\r
94 > UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 3447=
\r
95 : ordinal not in range(128)
\r
97 My first guess is that the file's encoding doesn't match your locale.
\r
98 Do you have a non-ASCII locale set? You can check with:
\r
102 LC_CTYPE=3D"en_US.UTF-8"
\r
103 LC_NUMERIC=3D"en_US.UTF-8"
\r
104 LC_TIME=3D"en_US.UTF-8"
\r
106 LC_MONETARY=3D"en_US.UTF-8"
\r
107 LC_MESSAGES=3D"en_US.UTF-8"
\r
108 LC_PAPER=3D"en_US.UTF-8"
\r
109 LC_NAME=3D"en_US.UTF-8"
\r
110 LC_ADDRESS=3D"en_US.UTF-8"
\r
111 LC_TELEPHONE=3D"en_US.UTF-8"
\r
112 LC_MEASUREMENT=3D"en_US.UTF-8"
\r
113 LC_IDENTIFICATION=3D"en_US.UTF-8"
\r
116 Although you can obviously have a different preferred language or
\r
117 Unicode-capable encoding. What you don't want is:
\r
122 LC_NUMERIC=3D"POSIX"
\r
124 LC_COLLATE=3D"POSIX"
\r
125 LC_MONETARY=3D"POSIX"
\r
126 LC_MESSAGES=3D"POSIX"
\r
129 LC_ADDRESS=3D"POSIX"
\r
130 LC_TELEPHONE=3D"POSIX"
\r
131 LC_MEASUREMENT=3D"POSIX"
\r
132 LC_IDENTIFICATION=3D"POSIX"
\r
135 If that's not the problem, could you attach the troublesome message?
\r
136 Or a minimal example derived from the troublesome message?
\r
142 This email may be signed or encrypted with GnuPG (http://www.gnupg.org).
\r
143 For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy
\r
146 Content-Type: application/pgp-signature; name="signature.asc"
\r
147 Content-Description: OpenPGP digital signature
\r
149 -----BEGIN PGP SIGNATURE-----
\r
152 iQIcBAEBAgAGBQJVGConAAoJEG8/JgBt8ol86+kP/RLld0FbhJa9Y6LTVsUpw/5c
\r
153 4Q/fEgbnORSJG1n6OQOy+bAG/N0DUZ06t1tR82ICpYdF8pO2cWGjc8mlwkdqRpA/
\r
154 hXoHCCPRyOGtgeD+qaTYlyWuXWxw95hEb0IyTlRtAYWqKFlyXT1ZwXrx92kXGNJw
\r
155 SzIH78telKf7IyO0hJBJrlsRxe+f2vqhzTPDC1Av7xhVflm7Jb/3EWtnqOSsA6aW
\r
156 yKZdb8nJGjdm0/wwJIBFns6kqsTy5TFpr45nmNfmwf8Uxr5cGHWL3tMVnUXofmsX
\r
157 7Gje2LBbHJX3sU2lKbNonh5O/t+y4cMVrJI4BCSqFqy3JkNA9GuBgoqyjHh6kEXD
\r
158 VN2bTS/2JlZfraAmgdF7oVZR8J905HTsaGc9PQK53jWubRXESnWSjIiPW/zqG84v
\r
159 RCV4eGIAN7rZvQU64AvPkrf6+7/qRueo9+r2ct0M6xQ9CzQHkerweBWE39dCS9LJ
\r
160 57zWjlwDqvSH/LjZEKJLkm7aCDaphXFOg0exPuxDbBeoRu6Gd+GuNABMVn6lnVpN
\r
161 Iz/zZ2qcMzsOk+y7NOe5v4AxytCH5gEvZMFncIzoLb6NSQ0DrFpBz7hEUZA/M6YG
\r
162 TIVhrbaofD1BalRZ5qlUK+kE9NnSqJW8q76rNU2sdqHIAs4+Znl8GQSiPNSFq4gN
\r
163 i5FMDCfejhVOKVDnyX+l
\r
165 -----END PGP SIGNATURE-----
\r
167 --P8VDRTGkfyc6BSVj--
\r