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 "myimap.py", line 70, in
result = obj.get_emails(date_gt='2021-03-17')
File "myimap.py", line 42, in get_emails
_, message = all_inbox_messages[index]
File "C:\Users\admin\anaconda3\envs\grades\lib\site-packages\imbox\messages.py", line 77, in getitem
return uid, self._fetch_email(uid)
File "C:\Users\admin\anaconda3\envs\grades\lib\site-packages\imbox\messages.py", line 42, in _fetch_email
return fetch_email_by_uid(uid=uid,
File "C:\Users\admin\anaconda3\envs\grades\lib\site-packages\imbox\parser.py", line 156, in fetch_email_by_uid
email_object = parse_email(raw_email, policy=parser_policy)
File "C:\Users\admin\anaconda3\envs\grades\lib\site-packages\imbox\parser.py", line 213, in parse_email
attachment = parse_attachment(part)
File "C:\Users\admin\anaconda3\envs\grades\lib\site-packages\imbox\parser.py", line 123, in parse_attachment
filename_parts.insert(int(s_name[1]),value[1:-1] if value.startswith('"') else value)
ValueError: invalid literal for int() with base 10: ''
I found 【s_name = ['file_name', '']】, so I add some code.
ifs_name[0] =='filename':
# If this is a split file name - use the number after the * as an index to insert this partiflen(s_name) >1ands_name[1] !='':
filename_parts.insert(int(s_name[1]),value[1:-1] ifvalue.startswith('"') elsevalue)
else:
filename_parts.insert(0,value[1:-1] ifvalue.startswith('"') elsevalue)
I don't kown why s_name has '', but it's working.
The text was updated successfully, but these errors were encountered:
When I try to get message, I got ValueError.
I found 【s_name = ['file_name', '']】, so I add some code.
I don't kown why s_name has '', but it's working.
The text was updated successfully, but these errors were encountered: