Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnicodeEncodeError: 'ascii' codec can't encode character #2

Open
CipherGuardianSweden opened this issue Apr 19, 2022 · 0 comments
Open

Comments

@CipherGuardianSweden
Copy link

[config.yaml] 2022-04-19 23:39:12:ERROR:Exception raised during forward()
Traceback (most recent call last):
  File "imap2imap.py", line 85, in run
    dest_imap_config=self.config['dest_imap']
  File "imap2imap.py", line 184, in forward
    mailbox=dest_imap_config.get("mailbox", "INBOX")
  File "imap2imap.py", line 354, in upload_message
    message=msg.as_bytes()
  File "C:\Python34\lib\email\message.py", line 178, in as_bytes
    g.flatten(self, unixfrom=unixfrom)
  File "C:\Python34\lib\email\generator.py", line 116, in flatten
    self._write(msg)
  File "C:\Python34\lib\email\generator.py", line 181, in _write
    self._dispatch(msg)
  File "C:\Python34\lib\email\generator.py", line 214, in _dispatch
    meth(msg)
  File "C:\Python34\lib\email\generator.py", line 264, in _handle_multipart
    self.write(subparts)
  File "C:\Python34\lib\email\generator.py", line 406, in write
    self._fp.write(s.encode('ascii', 'surrogateescape'))
UnicodeEncodeError: 'ascii' codec can't encode character '\xf6' in position 26: ordinal not in range(128)

I got also the same mail over and over on the host side. Any solution to this? Otherwise a good script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant