Open
Description
Dear bluebird75,
The script is throwing an error.
23:50:28 Progress: msg 173400 of 225509
23:50:29 Progress: msg 173500 of 225509
ERROR 23:50:29 Exception while processing msg with key: 1642324253.M699656P643386.mail,S=3478,W=3548
Traceback (most recent call last):
File "/Volumes/T7 Touch/MailArchive/maildir2mbox.py", line 205, in <module>
convert(Path(args.maildir_path), Path(args.mbox_filename), bool(args.recurse))
File "/Volumes/T7 Touch/MailArchive/maildir2mbox.py", line 105, in convert
result = maildir2mailbox(maildir_path, mbox_path)
File "/Volumes/T7 Touch/MailArchive/maildir2mbox.py", line 81, in maildir2mailbox
mbox.add(msg)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/mailbox.py", line 606, in add
self._toc[self._next_key] = self._append_message(message)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/mailbox.py", line 761, in _append_message
offsets = self._install_message(message)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/mailbox.py", line 833, in _install_message
self._dump_message(message, self._file, self._mangle_from_)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/mailbox.py", line 216, in _dump_message
gen.flatten(message)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/email/generator.py", line 116, in flatten
self._write(msg)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/email/generator.py", line 181, in _write
self._dispatch(msg)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/email/generator.py", line 218, in _dispatch
meth(msg)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/email/generator.py", line 268, in _handle_multipart
self.write(subparts)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/email/generator.py", line 410, in write
self._fp.write(s.encode('ascii', 'surrogateescape'))
UnicodeEncodeError: 'ascii' codec can't encode characters in position 532-537: ordinal not in range(128)
Is there any way to fix it?
Metadata
Metadata
Assignees
Labels
No labels