'str' object has no attribute 'message_from_bytes'
问题 I have a piece of code to get emails from messages from my inbox (gmail). Getting emails work correct when I print email_from but I would like to do some operation on data split name and email etc. but then code broke after print first loop step and I got the error: Traceback (most recent call last): File "C:\Users\loc\Desktop\extract_gmail.py", line 24, in <module> email_message_raw = email.message_from_bytes(data[0][1]) AttributeError: 'str' object has no attribute 'message_from_bytes' Can