error when parsing attachment
See original GitHub issueI am running the example provided by README, My python version is 3.5, on windows platform, here is the error message, please take a look.
Traceback (most recent call last):
File "C:\Users\**\Miniconda3\lib\base64.py", line 518, in _input_type_check
m = memoryview(s)
TypeError: memoryview: a bytes-like object is required, not 'str'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "D:/Project/account-adapter/imbox_downloader.py", line 61, in <module>
for uid, message in all_messages:
File "C:\Users\**\Miniconda3\lib\site-packages\imbox\__init__.py", line 50, in fetch_list
yield (uid, self.fetch_by_uid(uid))
File "C:\Users\**\Miniconda3\lib\site-packages\imbox\__init__.py", line 41, in fetch_by_uid
email_object = parse_email(raw_email)
File "C:\Users\**\Miniconda3\lib\site-packages\imbox\parser.py", line 160, in parse_email
attachment = parse_attachment(part)
File "C:\Users\**\Miniconda3\lib\site-packages\imbox\parser.py", line 102, in parse_attachment
name, value = decode_param(param)
File "C:\Users\**\Miniconda3\lib\site-packages\imbox\parser.py", line 74, in decode_param
value = base64.decodestring(code)
File "C:\Users\**\Miniconda3\lib\base64.py", line 560, in decodestring
return decodebytes(s)
File "C:\Users\**\Miniconda3\lib\base64.py", line 552, in decodebytes
_input_type_check(s)
File "C:\Users\**\Miniconda3\lib\base64.py", line 521, in _input_type_check
raise TypeError(msg) from err
TypeError: expected bytes-like object, not str
Issue Analytics
- State:
- Created 7 years ago
- Comments:5
Top Results From Across the Web
Parse Json error for Attachments - Power Platform Community
Im getting an Error for the parse Json for gathering the values of an attachment. i have posted a screenshot below. the flow...
Read more >if there is issue with attachment parsing do not discard ...
if there is an issue with attachment parsing do not discard complete email, discard only attachment but process email. as of now, we...
Read more >Could not parse message attachment. failed to parse field
A detailed guide on how to resolve errors related to "could not parse message attachment. failed to parse field"
Read more >Error on missing mimetype for attachments when parsing ...
Hi guys, I'm getting a "org.simplejavamail.converter.internal.msgparser.OutlookMessageException: Unable to parse Outlook message" exception ...
Read more >Getting error while parsing documents - Elastic Discuss
I am using Ingest-attachment for indexing documents. I am able to parse text documents (.txt files). When I try to parse .doc or...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@ChurchillDu please open a new issue. The old one is four years old, not the same issue as yours (the error message is different) and this issue here was already fixed.
I got this error python3.9 on win10