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: 'utf-8' codec can't encode character '\udcea' in fetchmail #35485
Comments
Hi @vvolas , We have the same issu on our fresh v12. Hi @Yenthe666 , could you recommend us somebody to ping . Cordialement |
Most likely @tde-banana-odoo as he's the mail guy |
Thanks @Yenthe666 , @tde-banana-odoo , is there any global conf we could set to use defensive on this kind of issue ? |
Email parsing errors are actually quite common, I even wrote module/hack which would register task in odoo of email parsing error, because now if it fails user has no idea that he got reply... |
@vvolas , Regards |
Hello Guys, |
Hello, Thanks for pointing it out. We will have a look at it. Thanks, |
Thanks! To clarify the problem the log details:
This error does not always occur. |
sadly we have no solution for this. |
Thanks for your answer! |
Any update for this @tde-banana-odoo ? |
Hello @gglazer , If your issue is critical, better open an OPW. Indeed github issues have no deadline as they are handled by R&D (and not the Bugfix team). Cheers, |
Currently, my client has the same issue and I try to fix it.
Maybe it's related to Latin, Mailer, attachment ... @gglazer can you share with me your full email content?. |
This bug is in python mail or forgot how it was called library. I remember
doing hackaround and updating files in python lib, but I no longer work
there :)
…On Thu, 4 Nov 2021, 10:39 Anh Vu, ***@***.***> wrote:
Currently, my client has the same issue and I try to fix it.
It doesn't happen usually, we are using feature create lead automatically.
Sometimes the end-user sends an email to the mailbox and Odoo creates the
Lead but there is no information in the content.
Here is what do I have in the log:
2021-11-03 15:22:00,098 16133 INFO production_db
odoo.addons.fetchmail.models.fetchmail: 2021-11-03 15:22:00,935 16133 ERROR
production_db odoo.addons.crm.models.crm_lead: crm.lead > message_new >
email_cc : 公司 - abc ***@***.***> 2021-11-03 15:22:01,201 16133 INFO
production_db odoo.addons.fetchmail.models.fetchmail: Failed to process
mail from pop server XXX Traceback (most recent call last): File
"/opt/odoo/odoo/addons/fetchmail/models/fetchmail.py", line 205, in
fetch_mail res_id =
MailThread.with_context(**additionnal_context).message_process(server.object_id.model,
message, save_original=server.original, strip_attachments=(not
server.attach)) File "/opt/odoo/odoo/addons/mail/models/mail_thread.py",
line 1425, in message_process thread_id =
self.message_route_process(msg_txt, msg, routes) File
"/opt/odoo/odoo/addons/mass_mailing/models/mail_thread.py", line 44, in
message_route_process return super(MailThread,
self).message_route_process(message, message_dict, routes) File
"/opt/odoo/odoo/addons/mail/models/mail_thread.py", line 1353, in
message_route_process new_msg = thread.message_post(**post_params) File
"/opt/odoo/odoo/addons/rating/models/mail_thread.py", line 14, in
message_post message = super(MailThread, self).message_post(**kwargs) File
"/opt/odoo/odoo/addons/mail/models/mail_thread.py", line 1895, in
_message_post_process_attachments content = content.encode('utf-8')
UnicodeEncodeError: 'utf-8' codec can't encode character '\udcb3' in
position 5563: surrogates not allowed 2021-11-03 15:22:01,293 5567 DEBUG
production_db odoo.modules.registry: Multiprocess signaling check:
[Registry - 587 -> 587] [Cache - 62380 -> 62380]
Maybe it's related to Latin, Mailer ...
@gglazer <https://github.com/gglazer> can you share with me your full
email content?.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#35485 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AALBY2FIAUNEHENJBSWNSBTUKJBF5ANCNFSM4IJVKY7A>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
In 2023 the problem still exsists. Any update on this? |
Impacted versions: 11
DISTRIB_DESCRIPTION="Ubuntu 16.04.6 LTS"
Steps to reproduce: Get email with weird characters :) Odoo fails to process it.
I attached original untouched email, with vim I tried to go to exactly that character in email file and near that point there is line:
"To jest wieloczê�ciowa wiadomo�æ w formacie MIME." which I think causes problems.
Odoo error log(debug):
2019-08-06 10:56:11,128 406950 INFO gs odoo.addons.mail.models.mail_thread: Routing mail from "XXX" <XXX@XX.pl> to "AAAA" <ooo@XXX.net> with Message-Id <FAB15A96985E43F4967BD582B0578FD4@userKomputer>: direct reply to msg: model: crm.lead, thread_id: 5406, custom_values: None, uid: 1 2019-08-06 10:56:11,134 406950 INFO gs odoo.addons.fetchmail.models.fetchmail: Failed to process mail from imap server ooo@XXX.net. Traceback (most recent call last): File "/usr/lib/python3/dist-packages/odoo/addons/fetchmail/models/fetchmail.py", line 179, in fetch_mail res_id = MailThread.with_context(**additionnal_context).message_process(server.object_id.model, data[0][1], save_original=server.original, strip_attachments=(not server.attach)) File "/usr/lib/python3/dist-packages/odoo/addons/mail/models/mail_thread.py", line 1307, in message_process thread_id = self.message_route_process(msg_txt, msg, routes) File "/usr/lib/python3/dist-packages/odoo/addons/mail/models/mail_thread.py", line 1235, in message_route_process new_msg = thread.message_post(subtype=subtype, partner_ids=partner_ids, **message_dict) File "/opt/odoo/addons_git/musu/bt_disable_partner_as_follower/models/mail_thread.py", line 164, in message_post attachment_ids = self._message_post_process_attachments(attachments, kwargs.pop('attachment_ids', []), values) File "/usr/lib/python3/dist-packages/odoo/addons/mail/models/mail_thread.py", line 1751, in _message_post_process_attachments content = content.encode('utf-8') UnicodeEncodeError: 'utf-8' codec can't encode character '\udcea' in position 2569: surrogates not allowed 2019-08-06 10:56:11,141 406950 INFO gs odoo.addons.fetchmail.models.fetchmail: Fetched 1 email(s) on imap server ooo@XXX.net; 0 succeeded, 1 failed.
Expected behavior: Email gets parsed.
origininal_email
The text was updated successfully, but these errors were encountered: