noDRM / DeDRM_tools

DeDRM tools for ebooks
7.15k stars 321 forks source link

DeDRM not working on new computer #658

Closed DavidGJ84 closed 1 hour ago

DavidGJ84 commented 4 hours ago

Question / bug report

I got a new Lenovo laptop and installed Calibre, the KFX input plugin, as well as the DeDRM plugin. I also have the Kindle for PC app installed on my computer. The DeDRM plugin is not removing DRM on my new computer. I tried on my old computer, which has the same versions of all the apps/programs/plugins and it worked.

I am attaching the problem log below and will also include the log from the other computer where it worked. Any help would be greatly appreciated!

Here is the log file created from my old computer where it worked:

ApplicationPaletteChange event ignored Using calibre Qt style: True calibre Debug log calibre 7.20 embedded-python: True Windows-10-10.0.22000-SP0 Windows ('64bit', 'WindowsPE') ('Windows', '10', '10.0.22000') Python 3.11.5 Windows: ('10', '10.0.22000', '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, 16, 0) && DeDRM (10, 0, 9) && Package KFX (from KFX Input) (2, 16, 0) && KFX metadata reader (from KFX Input) (2, 16, 0) && From KFX (2, 16, 0) && KFX Input (2, 16, 0) calibre 7.20 embedded-python: True Windows-10-10.0.22000-SP0 Windows ('64bit', 'WindowsPE') ('Windows', '10', '10.0.22000') Python 3.11.5 Windows: ('10', '10.0.22000', '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, 16, 0) && DeDRM (10, 0, 9) && Package KFX (from KFX Input) (2, 16, 0) && KFX metadata reader (from KFX Input) (2, 16, 0) && From KFX (2, 16, 0) && KFX Input (2, 16, 0) QPA platform: windows devicePixelRatio: 1.25 logicalDpi: 96.0 x 96.0 physicalDpi: 126.26019417475726 x 126.12413793103448 [0.00] Starting up... [0.00] Showing splash screen... [1.22] splash screen shown [1.22] Initializing db... [1.31] db initialized [1.31] Constructing main UI... [4.95] GUI main window shown [5.22] main UI initialized... [5.22] Hiding splash screen [5.22] splash screen hidden [5.22] Started up in 5.22 seconds with 6 books stdout+stderr from file dialog helper: [b'', b''] piped data from file dialog helper: [b'/\xde\xd8x\xddF\x7fjJ-\xc5e\xe7\x17\x0cn\x81\xf6\xb2#Y\xd8\r\xd7\xe9\xfc\xdc\x0e\xb9\xc1\xc2\xe6', b'C:\Users\david.johnston\Documents\My Kindle Content\B001EQ4OJW_EBOK\B001EQ4OJW_EBOK.azw'] Gather KFX-ZIP (from KFX Input) 2.16.0: Importing C:\Users\david.johnston\Documents\My Kindle Content\B001EQ4OJW_EBOK\B001EQ4OJW_EBOK.azw Gather KFX-ZIP (from KFX Input): Gathered 4 file(s) as C:\Users\DAVID~1.JOH\AppData\Local\Temp\calibre_9abthxin\ps_gb2j0.kfx-zip DeDRM v10.0.9: Trying to decrypt ps_gb2j0.kfx-zip Decrypting KFX-ZIP ebook: ps_gb2j0 Got DSN key from database kindle_key_1719183702_1 Found 1 keys to try after 1.1 seconds Decrypting KFX DRM voucher: amzn1.drm-voucher.v1.dda327ee-9429-453a-874f-1a99673c4678.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\david.johnston\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 105, in decrypt_voucher File "C:\Users\david.johnston\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: B001EQ4OJW_EBOK.azw Decryption succeeded after 1.1 seconds DeDRM v10.0.9: Finished after 1.1 seconds Package KFX (from KFX Input) 2.16.0: Packaging C:\Users\DAVID~1.JOH\AppData\Local\Temp\calibre_9abthxin\43g660ze.kfx-zip Processing container: B001EQ4OJW_EBOK.azw Processing container: CR!6F5KA2Y6K511X5W4QTMB9E4EPQR8.azw.res Processing container: CR!ZYFVA9S1W91P96RVZ9BYN7WDSJRT.azw.md Features: CanonicalFormat-2, kfxgen.textBlock-1, reflow-style-6 Metadata: ASIN=B001EQ4OJW, asset_id=CR!5XR8219TV1285CJ0B0XWDK0T1C4M, author="Frankfurt, Harry G.", book_id=1qYX6HtuQAuIgUjeqVvV0w0, cde_content_type=EBOK, content_id=B001EQ4OJW, cover_image=1240x1872, creator_version=2.15.0, file_creator=YJConversionTools, is_sample=False, issue_date=2009-01-10, kfxgen=20.12.238.0, language=en, max_id=833, min_kindle_version=5.8.7, nested_span=enabled, override_kindle_font=False, pages=74, publisher="Princeton University Press", reading_orders=1, selection=enabled, title="On Bullshit" Package KFX (from KFX Input): Imported as KFX KFX metadata reader (from KFX Input) activated for C:\Users\DAVID~1.JOH\AppData\Local\Temp\calibre_9abthxin\vfdrwqxl_add_books\0\B001EQ4OJW_EBOK.kfx

Which version of Calibre are you running?

7.20

Which version of the DeDRM plugin are you running?

v10.0.9

If applicable, which version of the Kindle software are you running?

2.5.0

Log output

ApplicationPaletteChange event ignored
Using calibre Qt style: True
calibre Debug log
calibre 7.20  embedded-python: True
Windows-10-10.0.26100-SP0 Windows ('64bit', 'WindowsPE')
('Windows', '10', '10.0.26100')
Python 3.11.5
Windows: ('10', '10.0.26100', '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, 16, 0) && DeDRM (10, 0, 9) && Package KFX (from KFX Input) (2, 16, 0) && KFX metadata reader (from KFX Input) (2, 16, 0) && From KFX (2, 16, 0) && KFX Input (2, 16, 0) && Obok DeDRM (10, 0, 9)
calibre 7.20  embedded-python: True
Windows-10-10.0.26100-SP0 Windows ('64bit', 'WindowsPE')
('Windows', '10', '10.0.26100')
Python 3.11.5
Windows: ('10', '10.0.26100', '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, 16, 0) && DeDRM (10, 0, 9) && Package KFX (from KFX Input) (2, 16, 0) && KFX metadata reader (from KFX Input) (2, 16, 0) && From KFX (2, 16, 0) && KFX Input (2, 16, 0) && Obok DeDRM (10, 0, 9)
QPA platform: windows
devicePixelRatio: 1.0
logicalDpi: 96.0 x 96.0
physicalDpi: 92.53889943074003 x 92.67567567567568
[0.00] Starting up...
[0.00] Showing splash screen...
[1.19] splash screen shown
[1.19] Initializing db...
[1.20] db initialized
[1.20] Constructing main UI...
DEBUG:    0.0 obok::utilities.py - loading translations
DEBUG:    0.0 obok::dialogs.py - loading translations
DEBUG:    0.0 obok::config.py - loading translations
DEBUG:    0.0 obok::action_err.py - loading translations
[1.91] GUI main window shown
[1.92] main UI initialized...
[1.92] Hiding splash screen
[1.92] splash screen hidden
[1.92] Started up in 1.92 seconds with 0 books
Gather KFX-ZIP (from KFX Input) 2.16.0: Importing C:\Users\david\OneDrive\Documents\My Kindle Content\B001EQ4OJW_EBOK\B001EQ4OJW_EBOK.azw
Gather KFX-ZIP (from KFX Input): Gathered 4 file(s) as C:\Users\david\AppData\Local\Temp\calibre_dyf3r5_o\p6mr9euy.kfx-zip
DeDRM v10.0.9: Trying to decrypt p6mr9euy.kfx-zip
Decrypting KFX-ZIP ebook: p6mr9euy
Found 0 keys to try after 0.4 seconds
Decrypting KFX DRM voucher: amzn1.drm-voucher.v1.dda327ee-9429-453a-874f-1a99673c4678.voucher
Traceback (most recent call last):
  File "C:\Users\david\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 104, in decrypt_voucher
  File "C:\Users\david\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1394, in parse
  File "C:\Users\david\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 103, in _assert
Exception: Unknown type encountered in envelope, expected VoucherEnvelope
DeDRM v10.0.9: Failed to decrypt with error: Failed to decrypt KFX DRM voucher with any key
DeDRM v10.0.9: Looking for new default Kindle Key after 0.4 seconds
searching for kinfoFiles in C:\Users\david\AppData\Local
Found K4PC 1.25+ kinf2018 file: C:\Users\david\AppData\Local\Amazon\Kindle\storage\.kinf2018
Decrypted key file using IDString '3896190058' and UserName 'david'
DeDRM v10.0.9: Found 1 new key
Decrypting KFX-ZIP ebook: p6mr9euy
Got DSN key from database key_0
Found 1 keys to try after 0.5 seconds
Decrypting KFX DRM voucher: amzn1.drm-voucher.v1.dda327ee-9429-453a-874f-1a99673c4678.voucher
Traceback (most recent call last):
  File "calibre_plugins.dedrm.__init__", line 931, in KindleMobiDecrypt
  File "C:\Users\david\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 203, in GetDecryptedBook
  File "C:\Users\david\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 67, in processBook
  File "C:\Users\david\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 111, in decrypt_voucher
Exception: Failed to decrypt KFX DRM voucher with any key

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\david\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 104, in decrypt_voucher
  File "C:\Users\david\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1394, in parse
  File "C:\Users\david\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 103, in _assert
Exception: Unknown type encountered in envelope, expected VoucherEnvelope
Traceback (most recent call last):
  File "calibre_plugins.dedrm.__init__", line 931, in KindleMobiDecrypt
  File "C:\Users\david\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 203, in GetDecryptedBook
  File "C:\Users\david\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 67, in processBook
  File "C:\Users\david\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 111, in decrypt_voucher
Exception: Failed to decrypt KFX DRM voucher with any key

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\david\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 104, in decrypt_voucher
  File "C:\Users\david\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1394, in parse
  File "C:\Users\david\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 103, in _assert
Exception: Unknown type encountered in envelope, expected VoucherEnvelope
Traceback (most recent call last):
  File "calibre_plugins.dedrm.__init__", line 931, in KindleMobiDecrypt
  File "C:\Users\david\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 203, in GetDecryptedBook
  File "C:\Users\david\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 67, in processBook
  File "C:\Users\david\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 111, in decrypt_voucher
Exception: Failed to decrypt KFX DRM voucher with any key

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "calibre_plugins.dedrm.__init__", line 965, in KindleMobiDecrypt
  File "C:\Users\david\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 203, in GetDecryptedBook
  File "C:\Users\david\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 67, in processBook
  File "C:\Users\david\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 111, in decrypt_voucher
Exception: Failed to decrypt KFX DRM voucher with any key
DeDRM v10.0.9: Ultimately failed to decrypt after 0.5 seconds. Read the FAQs at noDRM's repository: https://github.com/noDRM/DeDRM_tools/blob/master/FAQs.md
Running file type plugin DeDRM failed with traceback:
Traceback (most recent call last):
  File "calibre_plugins.dedrm.__init__", line 931, in KindleMobiDecrypt
  File "C:\Users\david\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 203, in GetDecryptedBook
  File "C:\Users\david\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 67, in processBook
  File "C:\Users\david\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 111, in decrypt_voucher
Exception: Failed to decrypt KFX DRM voucher with any key

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "calibre\customize\ui.py", line 201, in _run_filetype_plugins
  File "calibre_plugins.dedrm.__init__", line 1030, in run
  File "calibre_plugins.dedrm.__init__", line 981, in KindleMobiDecrypt
calibre_plugins.dedrm.DeDRMError: DeDRM v10.0.9: Ultimately failed to decrypt after 0.5 seconds. Read the FAQs at noDRM's repository: https://github.com/noDRM/DeDRM_tools/blob/master/FAQs.md
Package KFX (from KFX Input) 2.16.0: Packaging C:\Users\david\AppData\Local\Temp\calibre_dyf3r5_o\p6mr9euy.kfx-zip
Processing container: B001EQ4OJW_EBOK.azw
Running file type plugin Package KFX (from KFX Input) failed with traceback:
Traceback (most recent call last):
  File "calibre\customize\ui.py", line 201, in _run_filetype_plugins
  File "calibre_plugins.kfx_input.package_filetype", line 23, in run
  File "calibre_plugins.kfx_input.package_filetype", line 34, in package_kfx
  File "calibre_plugins.kfx_input.kfxlib.yj_book", line 79, in convert_to_single_kfx
  File "calibre_plugins.kfx_input.kfxlib.yj_book", line 212, in decode_book
  File "calibre_plugins.kfx_input.kfxlib.yj_book", line 321, in get_container
calibre_plugins.kfx_input.kfxlib.utilities.KFXDRMError: Book container B001EQ4OJW_EBOK.azw has DRM and cannot be converted
KFX metadata reader (from KFX Input) activated for C:\Users\david\AppData\Local\Temp\calibre_dyf3r5_o\o_r2tck9_add_books\0\B001EQ4OJW_EBOK.kfx-zip
stdout+stderr from file dialog helper: [b'', b'']
piped data from file dialog helper: [b'Ko\x91EJ-W\x07-\xd5N\x88\xa4:\xf5Rq\xf4H\x13\x1b\x95\x92pOG\x19\xb8(\xa4b\x93', b'C:\\Users\\david\\OneDrive\\Documents\\My Kindle Content\\B001EQ4OJW_EBOK\\B001EQ4OJW_EBOK.azw']
ElleKayEm commented 3 hours ago

You need Kindle for PC 2.4.0 (70904) aka 2.4.70904. See method 2a in this post about blocking updates: https://www.mobileread.com/forums/showthread.php?t=361503

DavidGJ84 commented 1 hour ago

Awesome, it worked! Thank you!

David G. Johnston, PhD Pronouns: he/him/his

Assistant Professor of Physics Interim Vice President, OT-AAUP Oregon Institute of Technology, Portland-Metro Campus Room 208H Wilsonville, OR 97070 @.**@.> 503.821.1269

From: ElleKayEm @.> Sent: Monday, October 21, 2024 2:54 PM To: noDRM/DeDRM_tools @.> Cc: David Johnston @.>; Author @.> Subject: Re: [noDRM/DeDRM_tools] DeDRM not working on new computer (Issue #658)

You need Kindle for PC 2.4.0 (70904) aka 2.4.70904. See method 2a in this post about blocking updates: https://www.mobileread.com/forums/showthread.php?t=361503

- Reply to this email directly, view it on GitHubhttps://github.com/noDRM/DeDRM_tools/issues/658#issuecomment-2427812553, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AXGNAPZNGES4TEEF5QRY5C3Z4VZY3AVCNFSM6AAAAABQLCXA36VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMRXHAYTENJVGM. You are receiving this because you authored the thread.Message ID: @.**@.>>

ElleKayEm commented 1 hour ago

If you're all set, you can close the issue.