Email errors please help

Hi! So I have already few working email accounts but I am getting this error while trying to sync one of the mailboxes:
Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/email/doctype/email_account/email_account.py”, line 275, in receive
communication = self.insert_communication(msg, args=args)
File “/home/frappe/frappe-bench/apps/frappe/frappe/email/doctype/email_account/email_account.py”, line 332, in insert_communication
email = Email(raw)
File “/home/frappe/frappe-bench/apps/frappe/frappe/email/receive.py”, line 372, in init
self.set_subject()
File “/home/frappe/frappe-bench/apps/frappe/frappe/email/receive.py”, line 401, in set_subject
self.subject = self.subject.decode(“utf-8”)[:140]
File “/home/frappe/frappe-bench/env/lib/python2.7/encodings/utf_8.py”, line 16, in decode
return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: ‘utf8’ codec can’t decode byte 0x96 in position 28: invalid start byte

{‘retry’: 0, ‘log’: <function log at 0x7f7515259050>, ‘site’: u’site1.local’, ‘event’: u’all’, ‘method_name’: u’pull_from_email_account’, ‘method’: <function pull_from_email_account at 0x7f7514779578>, ‘user’: u’Administrator’, ‘kwargs’: {‘email_account’: u’XXX XXX’}, ‘async’: True, ‘job_name’: u’pull_from_email_account|XXX XXX’}
Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/background_jobs.py”, line 95, in execute_job
method(**kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/email/doctype/email_account/email_account.py”, line 704, in pull_from_email_account
email_account.receive()
File “/home/frappe/frappe-bench/apps/frappe/frappe/email/doctype/email_account/email_account.py”, line 284, in receive
self.handle_bad_emails(email_server, uid, msg, frappe.get_traceback())
File “/home/frappe/frappe-bench/apps/frappe/frappe/email/doctype/email_account/email_account.py”, line 318, in handle_bad_emails
unhandled_email.insert(ignore_permissions=True)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 219, in insert
self._validate()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 444, in _validate
self._sanitize_content()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/base_document.py”, line 589, in _sanitize_content
value = frappe.as_unicode(value)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 65, in as_unicode
return text_type(text, encoding)

And this is the 2nd account(It’s probably because this mailbox is huuuge):
{‘retry’: 0, ‘log’: <function log at 0x7f7515259050>, ‘site’: u’site1.local’, ‘event’: u’all’, ‘method_name’: u’pull_from_email_account’, ‘method’: <function pull_from_email_account at 0x7f7514779578>, ‘user’: u’Administrator’, ‘kwargs’: {‘email_account’: u’Michal Jurewicz’}, ‘async’: True, ‘job_name’: u’pull_from_email_account|Michal Jurewicz’}
Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/background_jobs.py”, line 95, in execute_job
method(**kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/email/doctype/email_account/email_account.py”, line 704, in pull_from_email_account
email_account.receive()
File “/home/frappe/frappe-bench/apps/frappe/frappe/email/doctype/email_account/email_account.py”, line 258, in receive
emails = email_server.get_messages()
File “/home/frappe/frappe-bench/apps/frappe/frappe/email/receive.py”, line 117, in get_messages
uid_list = email_list = self.get_new_mails()
File “/home/frappe/frappe-bench/apps/frappe/frappe/email/receive.py”, line 182, in get_new_mails
response, message = self.imap.uid(‘search’, None, self.settings.email_sync_rule)
File “/usr/lib/python2.7/imaplib.py”, line 773, in uid
typ, dat = self._simple_command(name, command, *args)
File “/usr/lib/python2.7/imaplib.py”, line 1088, in _simple_command
return self._command_complete(name, self._command(name, *args))
File “/usr/lib/python2.7/imaplib.py”, line 914, in _command_complete
raise self.error(‘command: %s => %s’ % (name, val))
error: command: UID => got more than 1000000 bytes

What can i do about this errors?
We need to have this mailboxes synced into ERPnext

Thanks
Damian

You can post technical queries on discuss.frappe.io