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
{{ message }}
Repository navigation
When saving an attachment headerFormatProperties can throw an exception when its input is None #324
Describe the bug headerFormatProperties can throw an exception when its input is None.
What code did you use or can we use to reproduce this error?
msg = extract_msg.Message(file_path)
for attachment in msg.attachments:
attachment.save(customPath=output_path)
Traceback
File "/home/user/project/process_msg_emails.py", line 46, in <module>
extract_msg_file(file_path, output_path)
File "/home/user/project/chronodata/emails/process_msg_files.py", line 30, in extract_msg_file
attachment.save(customPath=output_path)
File "/home/user/project/.venv/lib/python3.9/site-packages/extract_msg/attachment.py", line 241, in save
self.saveEmbededMessage(**kwargs)
File "/home/user/project/.venv/lib/python3.9/site-packages/extract_msg/attachment.py", line 254, in saveEmbededMessage
self.data.save(**kwargs)
File "/home/user/project/.venv/lib/python3.9/site-packages/extract_msg/message_base.py", line 902, in save
f.write(self.getSaveBody(**kwargs))
File "/home/user/project/.venv/lib/python3.9/site-packages/extract_msg/message_base.py", line 300, in getSaveBody
header = self.getInjectableHeader(prefix, joinStr, suffix, formatter).encode('utf-8')
File "/home/user/project/.venv/lib/python3.9/site-packages/extract_msg/message_base.py", line 227, in getInjectableHeader
allProps = self.headerFormatProperties
File "/home/user/project/.venv/lib/python3.9/site-packages/extract_msg/contact.py", line 722, in headerFormatProperties
'Business 2': strListToStr(self.businessTelephone2Number),
File "/home/user/project/.venv/lib/python3.9/site-packages/extract_msg/contact.py", line 699, in strListToStr
return ', '.join(inp)
TypeError: can only join an iterable
Activity
TheElementalOfDestruction commentedon Jan 18, 2023
Whoops, forgot to add this to the changelog for the new version. This fix was added to version 0.39.0