10-07-2024, 07:35 PM | #1 |
Wizard
Posts: 2,052
Karma: 13579113
Join Date: Oct 2007
Location: Almere, The Netherlands
Device: Kobo Sage
|
SSL errors when downloading metadata
For a while now metedata download is very spotty, an looking at the logs I see loads of there errors:
[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1006) A bit of googling tells me that has something to do with the Python certificate store missing certain certs or certs being invalid, but all of the solutions assume I'm running a full Python, which in the case of Calibre I'm obviously not. Anyone having an idea about how to to fix this? |
10-07-2024, 11:39 PM | #2 |
creator of calibre
Posts: 44,546
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Assuming you are on windows visit the site in question using the edge browser to get the certificates installed.
|
Advert | |
|
10-08-2024, 02:58 AM | #3 |
Wizard
Posts: 2,052
Karma: 13579113
Join Date: Oct 2007
Location: Almere, The Netherlands
Device: Kobo Sage
|
Thanks, Kovid. I'm on Windows, yes. I should have mentioned that, sorry. I visited my metadata sources (BOL NL, Amazon.com, Fantastic Fiction & Goodreads) with Edge. and restarted calibre afterwards. BOL & Amazon work, but both Goodreads & Fantastic Fiction still give me the following error:
Spoiler:
|
10-08-2024, 03:29 AM | #4 |
creator of calibre
Posts: 44,546
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Goodreads is having issues see the goodreads plugin thread about it. No clue about bol.nl. You can bypass the windows certificate store by setting the SSL_CERT_FILE env var to point to the mozilla-ca-certs.pem from the calibre installation folder. This will cause OpenSSL and hence python to use certificates from that file (which is the set of certificates Firefox uses) instead of the OS cerificate store.
Last edited by kovidgoyal; 10-08-2024 at 06:19 AM. |
10-08-2024, 04:31 AM | #5 |
Wizard
Posts: 2,052
Karma: 13579113
Join Date: Oct 2007
Location: Almere, The Netherlands
Device: Kobo Sage
|
Curiouser and curiouser... I set the variable (I'm seeing it set in both CMD and the GUI) but I'm still getting the same error for Goodreads and Fantastic Fiction. I'm using Portable, if it matters.
|
Advert | |
|
10-08-2024, 04:45 AM | #6 |
creator of calibre
Posts: 44,546
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Works for me with
Code:
SSL_CERT_FILE=C:/Program\ Files/Calibre2/app/resources/mozilla-ca-certs.pem calibre-debug -c "from calibre import browser; br = browser(); print(br.open('https://goodreads.com').geturl())" |
10-08-2024, 04:47 AM | #7 |
want to learn what I want
Posts: 1,260
Karma: 6433040
Join Date: Sep 2020
Device: Calibre E-book viewer
|
For what it may be worth, I did some searching and found a bunch of recent reports of the same SSL error 1006 over on the web:
https://learn.microsoft.com/en-us/an...1-got-sslerror https://issuetracker.google.com/issues/369237337 https://issuetracker.google.com/issues/355359279 https://www.reddit.com/r/Calibre/com...n_not_working/ Also, not sure if related: https://www.ibm.com/support/pages/se...e-2024-37891-0 https://exchange.xforce.ibmcloud.com...ilities/295053 |
10-08-2024, 06:00 AM | #8 |
Wizard
Posts: 2,052
Karma: 13579113
Join Date: Oct 2007
Location: Almere, The Netherlands
Device: Kobo Sage
|
Ah, ' CERT', not ' CERTIFICATE'. Yep, it works now. Thanks!
|
10-08-2024, 10:00 AM | #9 |
Wizard
Posts: 2,052
Karma: 13579113
Join Date: Oct 2007
Location: Almere, The Netherlands
Device: Kobo Sage
|
|
10-08-2024, 10:05 AM | #10 |
creator of calibre
Posts: 44,546
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Too many people are getting affected by this, the windows cert store seems very fragile. SO next release I will have calibre default to using its bundled certs with an env var to get it to use system certs instead. It already defaults to its own certs on macos
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
SSL issues with metadata download | Ybother | Library Management | 6 | 08-16-2023 02:41 AM |
SSL error when downloading cover | njpig | Recipes | 2 | 10-18-2021 06:09 AM |
Erratic errors downloading metadata | DNSB | Library Management | 4 | 10-01-2020 01:02 AM |
Metadata priority when re-downloading metadata | truth1ness | Library Management | 20 | 04-12-2015 02:02 PM |
Errors when getting metadata | erfjr | Library Management | 2 | 03-07-2013 04:27 AM |