noDRM / DeDRM_tools

DeDRM tools for ebooks
6.56k stars 287 forks source link

DRM removal not working on purchased Kindle book #523

Closed celinego closed 2 months ago

celinego commented 2 months ago

Hi, I'm new here and I've spent all day reading through lots of posts here and elsewhere and still don't know if/what I'm doing wrong.

Device: Windows 10 laptop K4pc version: 2.3.1 (70682) only because only version it'll download to (tried earlier with both 1.17 and 1.19 and it wouldnt) Calibre version: 7.7 Ebook ASIN: B0BP8Z9QTN_EBOK (kfx as has it's own amzn1.drm-voucher) DeDRM version: 10.0.9 KFX Input: 2.10.0 No updated plugins available.

Have imported purchased Amazon ebook in Calibre and it won't open. Says I should install a program capable of opening this type of file.

I don't know what/if I'm doing something wrong. One other Kindle Unlimited book it did open (but this was published prior to Jan 2023 and was azw format. Another KU one published in Feb 2023 won't open in Calibre either). I thought though that this one in the log would as I've actually purchased that one.
Any help/advice/pointing in the right direction would be really grateful. Or am I totally wrong in thinking that there is any way whatsoever to DeDrm any Amazon kindle books, purhased or free and get them into my Calibre library? Please be gentle with me ... I've been out of the loop for about a year!

Many thanks for reading...... Cindy.

ApplicationPaletteChange event ignored Using calibre Qt style: True calibre Debug log calibre 7.7 embedded-python: True Windows-10-10.0.19045-SP0 Windows ('64bit', 'WindowsPE') ('Windows', '10', '10.0.19045') Python 3.11.5 Windows: ('10', '10.0.19045', 'SP0', 'Multiprocessor Free') Interface language: None EXE path: C:\Program Files\Calibre2\calibre-debug.exe Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (2, 10, 0) && DeDRM (10, 0, 9) && Package KFX (from KFX Input) (2, 10, 0) && Comments Cleaner (1, 13, 0) && EpubCheck (0, 2, 5) && Fantastic Fiction (1, 7, 0) && Fantastic Fiction Adults (1, 3, 1) && KFX metadata reader (from KFX Input) (2, 10, 0) && From KFX (2, 10, 0) && KFX Input (2, 10, 0) && Set KFX metadata (from KFX Output) (2, 7, 0) && KFX Output (2, 7, 0) && KindleUnpack - The Plugin (0, 83, 1) && Modify ePub (1, 8, 3) && Reformat plugin (2, 4, 0) calibre 7.7 embedded-python: True Windows-10-10.0.19045-SP0 Windows ('64bit', 'WindowsPE') ('Windows', '10', '10.0.19045') Python 3.11.5 Windows: ('10', '10.0.19045', 'SP0', 'Multiprocessor Free') Interface language: None EXE path: C:\Program Files\Calibre2\calibre-debug.exe Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (2, 10, 0) && DeDRM (10, 0, 9) && Package KFX (from KFX Input) (2, 10, 0) && Comments Cleaner (1, 13, 0) && EpubCheck (0, 2, 5) && Fantastic Fiction (1, 7, 0) && Fantastic Fiction Adults (1, 3, 1) && KFX metadata reader (from KFX Input) (2, 10, 0) && From KFX (2, 10, 0) && KFX Input (2, 10, 0) && Set KFX metadata (from KFX Output) (2, 7, 0) && KFX Output (2, 7, 0) && KindleUnpack - The Plugin (0, 83, 1) && Modify ePub (1, 8, 3) && Reformat plugin (2, 4, 0) QPA platform: windows devicePixelRatio: 1.25 logicalDpi: 96.0 x 96.0 physicalDpi: 85.10994764397905 x 85.06046511627908 [0.00] Starting up... [0.02] Showing splash screen... [0.23] splash screen shown [0.23] Initializing db... [1.97] db initialized [1.97] Constructing main UI... [7.31] GUI main window shown [7.73] main UI initialized... [7.73] Hiding splash screen [11.38] splash screen hidden [11.38] Started up in 11.38 seconds with 7144 books stdout+stderr from file dialog helper: [b'', b''] piped data from file dialog helper: [b'\x1cE\xd9\xc3\xa6\x05n\xbeZ\nBB\x14O\xa7$^\xccIw\xc6\x8d\x0f\xcb\xba\xd2\xfa\xfa\xeaj]?', b'C:\Users\celin\Documents\My Kindle Content\B0BP8Z9QTN_EBOK\B0BP8Z9QTN_EBOK.azw'] Gather KFX-ZIP (from KFX Input) 2.10.0: Importing C:\Users\celin\Documents\My Kindle Content\B0BP8Z9QTN_EBOK\B0BP8Z9QTN_EBOK.azw Gather KFX-ZIP (from KFX Input): Gathered 4 file(s) as C:\Users\celin\AppData\Local\Temp\calibre_386zg7qe\pz8ubvw9.kfx-zip DeDRM v10.0.9: Trying to decrypt pz8ubvw9.kfx-zip Decrypting KFX-ZIP ebook: pz8ubvw9 Got DSN key from database default_key Found 1 keys to try after 2.3 seconds Decrypting KFX DRM voucher: amzn1.drm-voucher.v1.e7a23ce1-c022-4876-b85f-90b154b225bb.voucher Decryption failed, trying next fallback Decryption failed, trying next fallback Decryption failed, trying next fallback Decryption failed, trying next fallback Decryption failed, trying next fallback Decryption failed, trying next fallback Decryption failed, trying next fallback Decryption failed, trying next fallback Decryption failed, trying next fallback Decryption failed, trying next fallback Decryption failed, trying next fallback Decryption failed, trying next fallback Decryption failed, trying next fallback Traceback (most recent call last): File "C:\Users\celin\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 105, in decrypt_voucher File "C:\Users\celin\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1368, in decryptvoucher UnboundLocalError: cannot access local variable 'ex' where it is not associated with a value Decryption failed, trying next fallback Decryption succeeded KFX DRM voucher successfully decrypted Decrypting KFX DRMION: B0BP8Z9QTN_EBOK.azw Decryption succeeded after 2.4 seconds DeDRM v10.0.9: Finished after 2.4 seconds Package KFX (from KFX Input) 2.10.0: Packaging C:\Users\celin\AppData\Local\Temp\calibre_386zg7qe__ydpqu4.kfx-zip Processing container: B0BP8Z9QTN_EBOK.azw Processing container: CR!1E5NW91ZG52Y18ZF8P2SXTKPA6BD.azw.res Processing container: CR!A683EFEEG53919E0S1FGFZ5YYWRY.azw.md Features: CanonicalFormat-2, kfxgen.textBlock-1, max_id-832, reflow-style-2 Metadata: ASIN=B0BP8Z9QTN, asset_id=CR!WRB8T2C7T924V829VSE0D0E17J5S, author="Parks, Adele", book_id=E3KZqeMTQKqI4T_ihYGMmw0, cde_content_type=EBOK, content_id=B0BP8Z9QTN, cover_image=1248x1920, creator_version=2.15.0, file_creator=YJConversionTools, is_sample=False, issue_date=2023-08-17, kfxgen=20.12.238.0, language=en, nested_span=enabled, pages=432, publisher="HarperCollins Publishers", reading_orders=1, selection=enabled, title="Just Between Us: From the Sunday Times Number One bestselling author of Both Of You comes a sensational new psychological thriller" Package KFX (from KFX Input): Imported as KFX KFX metadata reader (from KFX Input) activated for C:\Users\celin\AppData\Local\Temp\calibre_386zg7qe\mslv74o__add_books\0\B0BP8Z9QTN_EBOK.kfx

ElleKayEm commented 2 months ago

Well, it was working with the current versions of Kindle for PC/Mac and the latest plugins. But you're the second person today I've seen having issues with that setup. (The other person had Kindle for Mac.) So I'm wondering if something has changed. I'll have to look into this further.

celinego commented 2 months ago

Thank yoyu ElleKayEm ... I thought I was doing something wrong as it's the first time I've attempted to so so in over a year. It's good to know I'm not the only one having an issue too. I really appreciate your reply and will keep coming back to see if you find anything :)

j-howell commented 2 months ago

Decryption succeeded KFX DRM voucher successfully decrypted Decrypting KFX DRMION: B0BP8Z9QTN_EBOK.azw Decryption succeeded after 2.4 seconds DeDRM v10.0.9: Finished after 2.4 seconds

That log shows successful DRM removal as did the log involving Kindle for Mac earlier today.

ElleKayEm commented 2 months ago

Oops, how did I miss that?

@celinego To open with calibre's ebook viewer, set the kfx format as a type to open in preferences.

celinego commented 2 months ago

Oh my word!!!! Thank you both ElleKayEm and j-howell so very very much. You geniuses!!! I didn't even think of the ebook viewer options. I'm glad it was an easy fix in the end. Maybe that's the what the first person with the same issue of Kindle for Mac needs to do too so I hope he gets to see this or the info can be passed on. Once again, many thanks to you both. You have made me very, very happy! :)

ElleKayEm commented 2 months ago

I went back and posted on their issue too. If you're all set, you can close this issue.