Anton Khirnov <an...@khirnov.net> added the comment:
Quoting R. David Murray (2021-07-06 18:59:56) > How are you encountering this error? The following program runs without > exception for me on master: > > from email import message_from_binary_file > from email.policy import SMTP > > msg = message_from_binary_file(open('mail.eml', 'rb'), policy=SMTP) > print(msg) The exception is thrown on accessing the 'to' header, so make that print(msg['to']) ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue39100> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com