Downloaded AZW files from Amazon/Kindle web site ("Manage Your Content and Devices") to Mac, then imported them to Calibre, but when trying to view imported files, Calibre viewer reported that they were still protected by DRM.
Which version of Calibre are you running?
7.1.0
Which version of the DeDRM plugin are you running?
v10.0.9
If applicable, which version of the Kindle software are you running?
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "calibre_plugins.dedrm.init", line 965, in KindleMobiDecrypt
book = k4mobidedrm.GetDecryptedBook(path_to_ebook,newkeys.items(),[],[],[],self.starttime)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/charliez/Library/Preferences/calibre/plugins/DeDRM.zip/k4mobidedrm.py", line 203, in GetDecryptedBook
mb.processBook(totalpids)
File "/Users/charliez/Library/Preferences/calibre/plugins/DeDRM.zip/mobidedrm.py", line 401, in processBook
raise DrmException("No key found in {0:d} PIDs tried.".format(len(goodpids)))
mobidedrm.DrmException: No key found in 8 PIDs tried.
DeDRM v10.0.9: Ultimately failed to decrypt after 4.8 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
book = k4mobidedrm.GetDecryptedBook(path_to_ebook,kindleDatabases,androidFiles,serials,pids,self.starttime)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/charliez/Library/Preferences/calibre/plugins/DeDRM.zip/k4mobidedrm.py", line 203, in GetDecryptedBook
mb.processBook(totalpids)
File "/Users/charliez/Library/Preferences/calibre/plugins/DeDRM.zip/mobidedrm.py", line 401, in processBook
raise DrmException("No key found in {0:d} PIDs tried.".format(len(goodpids)))
mobidedrm.DrmException: No key found in 7 PIDs tried.
During handling of the above exception, another exception occurred:
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "calibre_plugins.dedrm.init", line 965, in KindleMobiDecrypt
book = k4mobidedrm.GetDecryptedBook(path_to_ebook,newkeys.items(),[],[],[],self.starttime)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/charliez/Library/Preferences/calibre/plugins/DeDRM.zip/k4mobidedrm.py", line 203, in GetDecryptedBook
mb.processBook(totalpids)
File "/Users/charliez/Library/Preferences/calibre/plugins/DeDRM.zip/mobidedrm.py", line 401, in processBook
raise DrmException("No key found in {0:d} PIDs tried.".format(len(goodpids)))
mobidedrm.DrmException: No key found in 8 PIDs tried.
DeDRM v10.0.9: Ultimately failed to decrypt after 8.4 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
book = k4mobidedrm.GetDecryptedBook(path_to_ebook,kindleDatabases,androidFiles,serials,pids,self.starttime)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/charliez/Library/Preferences/calibre/plugins/DeDRM.zip/k4mobidedrm.py", line 203, in GetDecryptedBook
mb.processBook(totalpids)
File "/Users/charliez/Library/Preferences/calibre/plugins/DeDRM.zip/mobidedrm.py", line 401, in processBook
raise DrmException("No key found in {0:d} PIDs tried.".format(len(goodpids)))
mobidedrm.DrmException: No key found in 7 PIDs tried.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "calibre/customize/ui.py", line 187, in _run_filetype_plugins
File "calibre_plugins.dedrm.init", line 1030, in run
decrypted_ebook = self.KindleMobiDecrypt(path_to_ebook)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "calibre_plugins.dedrm.init", line 981, in KindleMobiDecrypt
raise DeDRMError("{0} v{1}: Ultimately failed to decrypt after {2:.1f} seconds. Read the FAQs at noDRM's repository: https://github.com/noDRM/DeDRM_tools/blob/master/FAQs.md".format(PLUGIN_NAME, PLUGIN_VERSION,time.time()-self.starttime))
calibre_plugins.dedrm.DeDRMError: DeDRM v10.0.9: Ultimately failed to decrypt after 8.4 seconds. Read the FAQs at noDRM's repository: https://github.com/noDRM/DeDRM_tools/blob/master/FAQs.md
2023-12-10 08:21:09.044 calibre-parallel[34011:796390] WARNING: Secure coding is not enabled for restorable state! Enable secure coding by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState: and returning YES.
If the device that was downloaded for was an E-ink Kindle (not a Fire), add the Kindle's serial number to DeDRM's customization. If that's not an E-ink Kindle, you'll need to use another method.
Question / bug report
Downloaded AZW files from Amazon/Kindle web site ("Manage Your Content and Devices") to Mac, then imported them to Calibre, but when trying to view imported files, Calibre viewer reported that they were still protected by DRM.
Which version of Calibre are you running?
7.1.0
Which version of the DeDRM plugin are you running?
v10.0.9
If applicable, which version of the Kindle software are you running?
Downloaded from web to Mac
Log output
Using calibre Qt style: True 2023-12-10 08:20:07.224 calibre-debug[33934:794796] WARNING: Secure coding is not enabled for restorable state! Enable secure coding by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState: and returning YES. calibre Debug log calibre 7.1 embedded-python: True macOS-14.1.1-x86_64-i386-64bit Darwin ('64bit', '') ('Darwin', '23.1.0', 'Darwin Kernel Version 23.1.0: Mon Oct 9 21:27:27 PDT 2023; root:xnu-10002.41.9~6/RELEASE_X86_64') Python 3.11.5 OSX: ('14.1.1', ('', '', ''), 'x86_64') Interface language: None Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (2, 6, 0) && DeDRM (10, 0, 9) && Package KFX (from KFX Input) (2, 6, 0) && KFX metadata reader (from KFX Input) (2, 6, 0) && KFX Input (2, 6, 0) && Set KFX metadata (from KFX Output) (2, 4, 0) && KFX Output (2, 4, 0) calibre 7.1 embedded-python: True macOS-14.1.1-x86_64-i386-64bit Darwin ('64bit', '') ('Darwin', '23.1.0', 'Darwin Kernel Version 23.1.0: Mon Oct 9 21:27:27 PDT 2023; root:xnu-10002.41.9~6/RELEASE_X86_64') Python 3.11.5 OSX: ('14.1.1', ('', '', ''), 'x8664') Interface language: None Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (2, 6, 0) && DeDRM (10, 0, 9) && Package KFX (from KFX Input) (2, 6, 0) && KFX metadata reader (from KFX Input) (2, 6, 0) && KFX Input (2, 6, 0) && Set KFX metadata (from KFX Output) (2, 4, 0) && KFX Output (2, 4, 0) QPA platform: cocoa devicePixelRatio: 1.0 logicalDpi: 72.0 x 72.0 physicalDpi: 93.00000139671988 x 93.0000013967199 [0.00] Starting up... [0.02] Showing splash screen... [0.18] splash screen shown [0.18] Initializing db... [0.19] db initialized [0.19] Constructing main UI... [0.89] main UI initialized... [0.89] Hiding splash screen Starting QuickView DeDRM v10.0.9: Trying to decrypt Legion of Super-Heroes (2019-) Vol. 1 Millennium.azw3 MobiDeDrm v1.1. Copyright © 2008-2022 The Dark Reverser, Apprentice Harper et al. [3.97] splash screen hidden [3.97] Started up in 3.97 seconds with 18 books Decrypting Kindle Format 8 ebook: Legion of Super-Heroes (2019-) Vol. 1: Millennium Got SerialNumber from database default_key Got UsernameHash from database default_key Found 7 keys to try after 1.1 seconds Crypto Type is: 2 DeDRM v10.0.9: Failed to decrypt with error: No key found in 7 PIDs tried. DeDRM v10.0.9: Looking for new default Kindle Key after 1.1 seconds Found k4Mac kinf2018 file: /Users/charliez/Library/Containers/com.amazon.Kindle/Data/Library/Application Support/Kindle/storage/.kinf2018 Found k4Mac kinf2018 file: /Users/charliez/Library/Application Support/Kindle/storage/.kinf2018 trying username b'charliez' on file /Users/charliez/Library/Containers/com.amazon.Kindle/Data/Library/Application Support/Kindle/storage/.kinf2018 trying IDString: b'a545e9b2cd62' trying IDString: b'2f24f0deb164' trying IDString: b'3539eff5123b' Decrypted key file using IDString '3539eff5123b' and UserName 'charliez' trying username b'charliez' on file /Users/charliez/Library/Application Support/Kindle/storage/.kinf2018 trying IDString: b'a545e9b2cd62' trying IDString: b'2f24f0deb164' trying IDString: b'3539eff5123b' Decrypted key file using IDString '3539eff5123b' and UserName 'charliez' DeDRM v10.0.9: Found 2 new keys MobiDeDrm v1.1. Copyright © 2008-2022 The Dark Reverser, Apprentice Harper et al. Decrypting Kindle Format 8 ebook: Legion of Super-Heroes (2019-) Vol. 1: Millennium Got DSN key from database key_0 Got DSN key from database key_1 Found 8 keys to try after 4.8 seconds Crypto Type is: 2 Traceback (most recent call last): File "calibre_plugins.dedrm.init", line 931, in KindleMobiDecrypt book = k4mobidedrm.GetDecryptedBook(path_to_ebook,kindleDatabases,androidFiles,serials,pids,self.starttime) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/charliez/Library/Preferences/calibre/plugins/DeDRM.zip/k4mobidedrm.py", line 203, in GetDecryptedBook mb.processBook(totalpids) File "/Users/charliez/Library/Preferences/calibre/plugins/DeDRM.zip/mobidedrm.py", line 401, in processBook raise DrmException("No key found in {0:d} PIDs tried.".format(len(goodpids))) mobidedrm.DrmException: No key found in 7 PIDs tried.
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "calibre_plugins.dedrm.init", line 965, in KindleMobiDecrypt book = k4mobidedrm.GetDecryptedBook(path_to_ebook,newkeys.items(),[],[],[],self.starttime) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/charliez/Library/Preferences/calibre/plugins/DeDRM.zip/k4mobidedrm.py", line 203, in GetDecryptedBook mb.processBook(totalpids) File "/Users/charliez/Library/Preferences/calibre/plugins/DeDRM.zip/mobidedrm.py", line 401, in processBook raise DrmException("No key found in {0:d} PIDs tried.".format(len(goodpids))) mobidedrm.DrmException: No key found in 8 PIDs tried. DeDRM v10.0.9: Ultimately failed to decrypt after 4.8 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 book = k4mobidedrm.GetDecryptedBook(path_to_ebook,kindleDatabases,androidFiles,serials,pids,self.starttime) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/charliez/Library/Preferences/calibre/plugins/DeDRM.zip/k4mobidedrm.py", line 203, in GetDecryptedBook mb.processBook(totalpids) File "/Users/charliez/Library/Preferences/calibre/plugins/DeDRM.zip/mobidedrm.py", line 401, in processBook raise DrmException("No key found in {0:d} PIDs tried.".format(len(goodpids))) mobidedrm.DrmException: No key found in 7 PIDs tried.
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "calibre/customize/ui.py", line 187, in _run_filetype_plugins File "calibre_plugins.dedrm.init", line 1030, in run decrypted_ebook = self.KindleMobiDecrypt(path_to_ebook) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "calibre_plugins.dedrm.init", line 981, in KindleMobiDecrypt raise DeDRMError("{0} v{1}: Ultimately failed to decrypt after {2:.1f} seconds. Read the FAQs at noDRM's repository: https://github.com/noDRM/DeDRM_tools/blob/master/FAQs.md".format(PLUGIN_NAME, PLUGIN_VERSION,time.time()-self.starttime)) calibre_plugins.dedrm.DeDRMError: DeDRM v10.0.9: Ultimately failed to decrypt after 4.8 seconds. Read the FAQs at noDRM's repository: https://github.com/noDRM/DeDRM_tools/blob/master/FAQs.md 2023-12-10 08:20:36.815 calibre-parallel[33977:795763] WARNING: Secure coding is not enabled for restorable state! Enable secure coding by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState: and returning YES. DeDRM v10.0.9: Trying to decrypt DC Through the 80s_ The End of Eras (DC Through the 80's (2020-)).azw3 MobiDeDrm v1.1. Copyright © 2008-2022 The Dark Reverser, Apprentice Harper et al. Added Legion of Super-Heroes (2019-) Vol. 1: Millennium to db in: 0.5 Added 1 books in 5.9 seconds Worker Launch took: 0.01 seconds Decrypting Kindle Format 8 ebook: DC Through the 80s: The End of Eras (DC Through the 80's (2020-)) Got SerialNumber from database default_key Got UsernameHash from database default_key Found 7 keys to try after 3.0 seconds Crypto Type is: 2 DeDRM v10.0.9: Failed to decrypt with error: No key found in 7 PIDs tried. DeDRM v10.0.9: Looking for new default Kindle Key after 3.0 seconds Found k4Mac kinf2018 file: /Users/charliez/Library/Containers/com.amazon.Kindle/Data/Library/Application Support/Kindle/storage/.kinf2018 Found k4Mac kinf2018 file: /Users/charliez/Library/Application Support/Kindle/storage/.kinf2018 trying username b'charliez' on file /Users/charliez/Library/Containers/com.amazon.Kindle/Data/Library/Application Support/Kindle/storage/.kinf2018 trying IDString: b'a545e9b2cd62' trying IDString: b'2f24f0deb164' trying IDString: b'3539eff5123b' Decrypted key file using IDString '3539eff5123b' and UserName 'charliez' trying username b'charliez' on file /Users/charliez/Library/Application Support/Kindle/storage/.kinf2018 trying IDString: b'a545e9b2cd62' trying IDString: b'2f24f0deb164' trying IDString: b'3539eff5123b' Decrypted key file using IDString '3539eff5123b' and UserName 'charliez' DeDRM v10.0.9: Found 2 new keys MobiDeDrm v1.1. Copyright © 2008-2022 The Dark Reverser, Apprentice Harper et al. Decrypting Kindle Format 8 ebook: DC Through the 80s: The End of Eras (DC Through the 80's (2020-)) Got DSN key from database key_0 Got DSN key from database key_1 Found 8 keys to try after 8.4 seconds Crypto Type is: 2 Traceback (most recent call last): File "calibre_plugins.dedrm.init", line 931, in KindleMobiDecrypt book = k4mobidedrm.GetDecryptedBook(path_to_ebook,kindleDatabases,androidFiles,serials,pids,self.starttime) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/charliez/Library/Preferences/calibre/plugins/DeDRM.zip/k4mobidedrm.py", line 203, in GetDecryptedBook mb.processBook(totalpids) File "/Users/charliez/Library/Preferences/calibre/plugins/DeDRM.zip/mobidedrm.py", line 401, in processBook raise DrmException("No key found in {0:d} PIDs tried.".format(len(goodpids))) mobidedrm.DrmException: No key found in 7 PIDs tried.
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "calibre_plugins.dedrm.init", line 965, in KindleMobiDecrypt book = k4mobidedrm.GetDecryptedBook(path_to_ebook,newkeys.items(),[],[],[],self.starttime) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/charliez/Library/Preferences/calibre/plugins/DeDRM.zip/k4mobidedrm.py", line 203, in GetDecryptedBook mb.processBook(totalpids) File "/Users/charliez/Library/Preferences/calibre/plugins/DeDRM.zip/mobidedrm.py", line 401, in processBook raise DrmException("No key found in {0:d} PIDs tried.".format(len(goodpids))) mobidedrm.DrmException: No key found in 8 PIDs tried. DeDRM v10.0.9: Ultimately failed to decrypt after 8.4 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 book = k4mobidedrm.GetDecryptedBook(path_to_ebook,kindleDatabases,androidFiles,serials,pids,self.starttime) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/charliez/Library/Preferences/calibre/plugins/DeDRM.zip/k4mobidedrm.py", line 203, in GetDecryptedBook mb.processBook(totalpids) File "/Users/charliez/Library/Preferences/calibre/plugins/DeDRM.zip/mobidedrm.py", line 401, in processBook raise DrmException("No key found in {0:d} PIDs tried.".format(len(goodpids))) mobidedrm.DrmException: No key found in 7 PIDs tried.
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "calibre/customize/ui.py", line 187, in _run_filetype_plugins File "calibre_plugins.dedrm.init", line 1030, in run decrypted_ebook = self.KindleMobiDecrypt(path_to_ebook) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "calibre_plugins.dedrm.init", line 981, in KindleMobiDecrypt raise DeDRMError("{0} v{1}: Ultimately failed to decrypt after {2:.1f} seconds. Read the FAQs at noDRM's repository: https://github.com/noDRM/DeDRM_tools/blob/master/FAQs.md".format(PLUGIN_NAME, PLUGIN_VERSION,time.time()-self.starttime)) calibre_plugins.dedrm.DeDRMError: DeDRM v10.0.9: Ultimately failed to decrypt after 8.4 seconds. Read the FAQs at noDRM's repository: https://github.com/noDRM/DeDRM_tools/blob/master/FAQs.md 2023-12-10 08:21:09.044 calibre-parallel[34011:796390] WARNING: Secure coding is not enabled for restorable state! Enable secure coding by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState: and returning YES.