Message384847
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 |
|
Date |
User |
Action |
Args |
2021-01-11 16:45:57 | xavier2 | set | recipients:
+ xavier2, barry, r.david.murray, iritkatriel |
2021-01-11 16:45:57 | xavier2 | set | messageid: <1610383557.89.0.290771399006.issue42892@roundup.psfhosted.org> |
2021-01-11 16:45:57 | xavier2 | link | issue42892 messages |
2021-01-11 16:45:57 | xavier2 | create | |
|