Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.maint.python > #12831
| Path | csiph.com!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Andreas Tille <andreas@an3as.eu> |
| Newsgroups | linux.debian.maint.python |
| Subject | Issues when reading mailboxes from alioth-lists.debian.net |
| Date | Wed, 19 Aug 2020 15:10:03 +0200 |
| Message-ID | <AFw0P-3fr-21@gated-at.bofh.it> (permalink) |
| X-Original-To | Debian Python <debian-python@lists.debian.org> |
| X-Mailbox-Line | From debian-python-request@lists.debian.org Wed Aug 19 13:01:48 2020 |
| Old-Return-Path | <andreas@an3as.eu> |
| X-Amavis-Spam-Status | No, score=-6.9 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, FOURLA=0.1, LDO_WHITELIST=-5] autolearn=ham autolearn_force=no |
| X-Policyd-Weight | using cached result; rate: -4.6 |
| MIME-Version | 1.0 |
| Content-Type | multipart/mixed; boundary="bjuZg6miEcdLYP6q" |
| Content-Disposition | inline |
| User-Agent | Mutt/1.10.1 (2018-07-13) |
| X-Mailing-List | <debian-python@lists.debian.org> archive/latest/18580 |
| List-ID | <debian-python.lists.debian.org> |
| List-URL | <https://lists.debian.org/debian-python/> |
| List-Archive | https://lists.debian.org/msgid-search/20200819130131.GG7363@an3as.eu |
| Approved | robomod@news.nic.it |
| Lines | 62 |
| Organization | linux.* mail to news gateway |
| Sender | robomod@news.nic.it |
| X-Original-Date | Wed, 19 Aug 2020 15:01:31 +0200 |
| X-Original-Message-ID | <20200819130131.GG7363@an3as.eu> |
| Xref | csiph.com linux.debian.maint.python:12831 |
Show key headers only | View raw
[Multipart message — attachments visible in raw view] - view raw
Hi,
in the teammetrics project I'm trying to parse mailboxes. This worked
with Python2 but after porting the code to Python3 I get some encoding
troubles. A specific one seem to be an error in the mailbox module.
Please run the attached script test_mbox which downloads one of the
critical mbox files from aliot-lists.debian.net and calls the also
attached simple Python3 script which ends in:
Traceback (most recent call last):
File "./test_mbox.py", line 6, in <module>
if mbox_file.items() != []:
File "/usr/lib/python3.8/mailbox.py", line 132, in items
return list(self.iteritems())
File "/usr/lib/python3.8/mailbox.py", line 125, in iteritems
value = self[key]
File "/usr/lib/python3.8/mailbox.py", line 73, in __getitem__
return self.get_message(key)
File "/usr/lib/python3.8/mailbox.py", line 781, in get_message
msg.set_from(from_line[5:].decode('ascii'))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 37: ordinal not in range(128)
Exit code: 1
IMHO it is a bug if those mailboxes can't be read. Am I missing
something?
Kind regards
Andreas.
--
http://fam-tille.de
Back to linux.debian.maint.python | Previous | Next — Next in thread | Find similar | Unroll thread
Issues when reading mailboxes from alioth-lists.debian.net Andreas Tille <andreas@an3as.eu> - 2020-08-19 15:10 +0200 Re: Issues when reading mailboxes from alioth-lists.debian.net Andreas Tille <andreas@an3as.eu> - 2020-08-19 20:10 +0200
csiph-web