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 xavier2
Recipients barry, iritkatriel, r.david.murray, xavier2
Date 2021-01-11.16:45:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1610383557.89.0.290771399006.issue42892@roundup.psfhosted.org>
In-reply-to
Content
Following this issue: https://bugs.python.org/issue33972

Same bug apply to email.message.get_body() with attached email example and the following code: 

        from email.policy import default
        import email

        with open('email_bad_formatted.eml', 'rb') as fp:
            msg = email.message_from_binary_file(fp, policy=default)
        body = msg.get_body()

> Result:
E       AttributeError: 'str' object has no attribute 'is_attachment'

/usr/local/lib/python3.9/email/message.py:978: AttributeError
History
Date User Action Args
2021-01-11 16:45:57xavier2setrecipients: + xavier2, barry, r.david.murray, iritkatriel
2021-01-11 16:45:57xavier2setmessageid: <1610383557.89.0.290771399006.issue42892@roundup.psfhosted.org>
2021-01-11 16:45:57xavier2linkissue42892 messages
2021-01-11 16:45:57xavier2create