You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "/home/tobias/ExtractMailAttachment.py", line 80, in <module>
mail = email.message_from_string(email_body)
File "/usr/lib/python3.9/email/__init__.py", line 38, in message_from_string
return Parser(*args, **kws).parsestr(s)
File "/usr/lib/python3.9/email/parser.py", line 67, in parsestr
return self.parse(StringIO(text), headersonly=headersonly)
*TypeError: initial_value must be str or None, not bytes*
Here I need help...
The text was updated successfully, but these errors were encountered:
I confirm that it depends on the Python version used: the program works on python2. Hence, in your case, it is needed to port it to python3.
Particularly, python3 embeds the imaplib library (see https://www.devdungeon.com/content/read-and-send-email-python), hence, the best porting would make use of such library, instead of the email one.
Get errors like this:
First error solved with print(...)
Here I need help...
The text was updated successfully, but these errors were encountered: