This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author frispete
Recipients barry, frispete, r.david.murray
Date 2016-07-14.10:50:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1468493411.01.0.0415400585896.issue27513@psf.upfronthosting.co.za>
In-reply-to
Content
An unfortunate combination of get_all and getaddresses results in a Traceback:

Traceback (most recent call last):
  File "misc/decode_from_header.py", line 17, in <module>
    print('From: %s' % email.utils.getaddresses(val))
  File "/usr/lib64/python3.4/email/utils.py", line 112, in getaddresses
    all = COMMASPACE.join(fieldvalues)
TypeError: sequence item 0: expected str instance, Header found

Here's the relevant part of it:
Content-type: text/html;charset=iso-8859-1
From: Itaú Uniclass. <comunicado.com.br@atendimento.gotdns.ch>

Obviously, the From header is iso-8859-1 encoded as well, and violates RFC 2822 as such. But making it crash in the usual combination of

    val = msg.get('from')
    email.utils.getaddresses([val])

isn't the real McCoy either..
History
Date User Action Args
2016-07-14 10:50:11frispetesetrecipients: + frispete, barry, r.david.murray
2016-07-14 10:50:11frispetesetmessageid: <1468493411.01.0.0415400585896.issue27513@psf.upfronthosting.co.za>
2016-07-14 10:50:10frispetelinkissue27513 messages
2016-07-14 10:50:10frispetecreate