AttributeError: 'module' object has no attribute 'message_from_bytes'
johann-lau opened this issue · 4 comments
johann-lau commented
Traceback (most recent call last):
File "Inbox.py", line 37, in <module>
msg = email.message_from_bytes(response[1])
AttributeError: 'module' object has no attribute 'message_from_bytes'
x4nth055 commented
Hey @johann-lau ,
email
module does have message_from_bytes()
method, make sure you:
- Have Python 3.3+.
- Do not have
email.py
file in the current directory, as it'll load it instead of theemail
module from the Python standard library.
Please let me know if this solved your issue.
johann-lau commented
thanks, I will check it out :)
Rockikz <notifications@github.com> 於 2020年12月29日週二 下午11:01寫道:
… Hey @johann-lau <https://github.com/johann-lau> ,
email module does have message_from_bytes() method, make sure you:
- Have Python 3.3+.
- Do not have email.py file in the current directory, as it'll load it
instead of the email module from the Python standard library.
Please let me know if this solved your issue.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#48 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/APUMJFR5ZTKJTQ2RCHCLWFTSXHVL7ANCNFSM4VLND3AQ>
.
--
Johann
x4nth055 commented
Please close the issue when you solve it.
Thanks!
johann-lau commented
Thanks very much! I renamed another file Email.py and this issue was solved :)