Code Yarns ‍👨‍💻
Tech Blog ❖ Personal Blog


📅 2022-Mar-17 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ calibre, error ⬩ 📚 Archive


I tried to use the Fetch News feature in Calibre to download a news source which had a RSS feed. The download job finished quickly, but the generated ebook had no pages, but had this error:

Traceback (most recent call last):
  File "mechanize\", line 1236, in do_open
  File "http\", line 1255, in request
  File "http\", line 1301, in _send_request
  File "http\", line 1250, in endheaders
  File "http\", line 1010, in _send_output
  File "http\", line 950, in send
  File "http\", line 1424, in connect
  File "", line 500, in wrap_socket
  File "", line 1040, in _create
  File "", line 1309, in do_handshake
  ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1123)

The same RSS feed or webpage opened without any problem in Firefox, Chrome, Edge and Internet Explorer.


This error is apparently due to an expired root certificate from Let’s Encrypt that might be stored in your Windows.

Calibre uses the Mechanize library to create a browser object and downloads pages using that. That object uses the root certificates from Windows and so is affected by the expired root certificate. The browsers have their own certificate store and so they are unaffected.

To delete the expired certificate:

After this, Calibre should be able to download the news.


Tried with: Calibre 5.38

© 2022 Ashwin Nanjappa • All writing under CC BY-SA license • 🐘 • 📧