IMAP library issue on upgrade to python 3

65 views
Skip to first unread message

Apoorv Sharma

unread,
Sep 23, 2019, 5:17:40 PM9/23/19
to robotframe...@googlegroups.com
Hello,

I am facing issues in some of the Imap library functions. For example, when I am using 'get email body', I am getting an error as 'quoted-printable' is not a text encoding. The IMAP library does not seem to be compatible with python 3. Could anyone suggest any workaround?

Regards,
Apoorv

T Rohit kumar sai

unread,
Sep 24, 2019, 1:53:02 AM9/24/19
to apoorvs...@gmail.com, robotframework-users
Hi apoorv,

I faced similar error where the email was sent but the data fetched was somehow wrong due to the quoted printed encoding format.

Can you quickly check you email's encoding format? What happens is imap by default expects all the emails to be encoded in quoted printable format. But problem arises when your mail is encoded in some other format.

If that is the case you need to bypass forced decoding of email from quoted printable.

For bypassing you need to download the imap's source code in you local and use it as a python library file. Then comment the line where its decoding and then try.

I understand your issue is related to python 3 version but try this once and let me know, it should work.


--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/robotframework-users/CAMAwJ93HjQZeUg2PLca_m%2BnyOLB5wJ-f5T7RnhDNtFCY-fCVSg%40mail.gmail.com.

Apoorv Sharma

unread,
Sep 24, 2019, 9:10:05 AM9/24/19
to T Rohit kumar sai, robotframework-users
Hi Rohit,
 
Yes, the email encoding format is utf-8. I tried bypassing by modifying the library function and it worked fine. 
Thank you for your help.

Regards,
Apoorv

T Rohit kumar sai

unread,
Sep 24, 2019, 9:13:48 AM9/24/19
to Apoorv Sharma, robotframework-users
Glad to hear it! 
Reply all
Reply to author
Forward
0 new messages