Error Processing source. Failed to guess encoding

When things don't work as they should.
Post Reply
jaime.leon
Posts: 2
Joined: Mon Aug 26, 2019 2:27 pm

Error Processing source. Failed to guess encoding

Post by jaime.leon » Mon Aug 26, 2019 3:14 pm

Hello to all,
I am a complete noob on this system. I just installed last week Mayan EDMS on Ubuntu 1904 as a test. Everything appears to work importing from a Watch Folder and I am well impressed by the system. I like the idea of importing email directly, but unfortunately this does not appear to work well for all conditions. After setting up the incoming email account parameters, Mayan imports just one email, which tells me access to the email server is OK, and fails with the error:

Error Processing source. Failed to guess encoding

The error is from the IMAP email source log. I am guessing that the error is due to Mayan not being able to cope with emails coming from China, which happens to be the second email in the email account. I have no idea where to look and I have been unable to find anything on Google to help me find a solution. I will appreciate any help.

Thanks in advance.
Jaime Leon

jaime.leon
Posts: 2
Joined: Mon Aug 26, 2019 2:27 pm

Re: Error Processing source. Failed to guess encoding

Post by jaime.leon » Mon Sep 02, 2019 6:43 pm

Hello
The offending email that shuts down the import is encoded in UTF-8 Chinese. How can I get Mayan to accept this encoding? Is there a workaround to maybe ignore the encoding?

Thanks in advance.

Jaime Leon

User avatar
rosarior
Posts: 406
Joined: Tue Aug 21, 2018 3:28 am

Re: Error Processing source. Failed to guess encoding

Post by rosarior » Tue Sep 03, 2019 2:25 am

Hi,

we would need a sample of the email that is causing the issue. If you could generate and dump a blank or sample test email so that we add an automated test for it. There is a merge request that I suspect deals with this (https://gitlab.com/mayan-edms/mayan-edm ... equests/54) but it is lacking a test email to be completed and merged.

danutz21
Posts: 1
Joined: Fri Oct 25, 2019 2:35 pm

Re: Error Processing source. Failed to guess encoding

Post by danutz21 » Fri Oct 25, 2019 2:48 pm

Hello,

I reached this topic by Google Search, I also encounter the same issue I believe, today I installed in a server Mayan Edms to check it out, this issue appeared when I configured as a source an e-mail account ( imap, hosted on a Cpanel server if it helps), the account has 6 e-mails all with a pdf attachment however after I pressed Check it now, it took only 1 e-mail and more exactly it's text body, no attachment and html version but cannot be read and then displayed the message below

"Error processing source: Failed to guess encoding

The e-mail is very basic and does not have anything in particular(text and pdf as attachment), I also noticed that after some time the cron of course run again, it got more e-mails and started to repeat, same error and from 6 e-mails, it generated 23 documents so far (for each e-mail text,html and missing attachment which would be the most important) I have also looked at the e-mail as in source and regarding encoding is:

Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset=ISO-8859-1

That being said, perhaps I did something wrong in the initial setup or am I missing something as I am merely testing the software if you could please let me know your opinion in this matter, I would also be interested if I could get the e-mail header too not only the body since I believe the html version also takes in only the body but the main issue is no attachment and that is taking some document multiple times I believe since there are not 23 e-mails and only 6.

I will continue to read the documentation and experiment with it in the meantime but taking documents from an e-mail account would be extremely important.

Post Reply