Skip to content

UnicodeDecodeError when restoring from eml files #511

@danpalmer

Description

@danpalmer

Unfortunately I don't think I can provide the email that failed because the import seems to be unordered and I don't believe gyp logs the file being processed before this point.

Wrapping this in error handling, logging the error and filename, and continuing with the restore would be a nice improvement.

Traceback (most recent call last):
  File "/opt/homebrew/bin/gyb", line 2897, in <module>
    main(sys.argv[1:])
    ~~~~^^^^^^^^^^^^^^
  File "/opt/homebrew/bin/gyb", line 2517, in main
    message = mbox.next()
  File "/opt/homebrew/Cellar/gyb/1.82_1/libexec/lib/python3.13/site-packages/fmbox.py", line 94, in next
    msg.set_from(self._last_from_line[5:].decode())
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa3 in position 70: invalid start byte

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions