onlyhavecans/ReadItLater-Calibre-Plugin

SSL: CERTIFICATE_VERIFY_FAILED

Opened this issue · 3 comments

Hello,

Since Calibre version 2.16 and later, Pocket Recipe doesn't work properly anymore.
I've got an error. It seems as it is an SSL error as stated by this extract :

Python function terminated unexpectedly
<urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581)> (Error Code: 1)

I've found this thread : http://www.mobileread.com/forums/showthread.php?t=254495#post3025740 that does not solve the problem.

Have you any idea to solve this issue ?
Thanks for this wonderful recipe.
JCH

Hello,

As a workaround that is not completely satisfying, adding this works for me :
import ssl
and in the Pocket class :
ssl._create_default_https_context = ssl._create_unverified_context

I can't make a PR with that suggestion, because it is not very safe, but it can help until finding a much better solution.

Can you send the complete code for a recipe with added lines?