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 stoksc
Recipients barry, r.david.murray, skrohlas, stoksc
Date 2018-07-02.05:39:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1530509982.32.0.56676864532.issue33972@psf.upfronthosting.co.za>
In-reply-to
Content
Hey Sven,

New here, decided to try a bit at an issue. 

According to the email.message docs, "the payload is either a string or bytes object, in the case of simple message objects, or a list of EmailMessage objects, for MIME container documents such as multipart/* and message/rfc822 message objects."

Like you said, this error happens if the email.message.EmailMessage object is bad, i.e. the payload is a string or bytes but the content-type is marked as multipart/*. After reading online, it seems like an error is necessary.

I've proposed a small change in a pull request to make this situation raise a more useful error. It doesn't blow up any earlier but it at least says something more useful. 

The function could return instead of throwing an error, just providing an empty iterator, but that seems even less useful.

I fixed it on master (3.8 dev or whatever).

Best,
Brad
History
Date User Action Args
2018-07-02 05:39:42stokscsetrecipients: + stoksc, barry, r.david.murray, skrohlas
2018-07-02 05:39:42stokscsetmessageid: <1530509982.32.0.56676864532.issue33972@psf.upfronthosting.co.za>
2018-07-02 05:39:42stoksclinkissue33972 messages
2018-07-02 05:39:41stoksccreate