apprenticeharper / DeDRM_tools

DeDRM tools for ebooks
14.56k stars 1.52k forks source link

[QUESTION] Title #2052

Open JavierDebian opened 2 years ago

JavierDebian commented 2 years ago

Title

My Environment

Calibre: Version 5.12.0

Kindle: Version G000-K905

DeDRM: Version 7.2.1

Log

Amazon - Una propuesta para humillar a España (Spanish Edition)_B086DQNSXS ```log Icon theme "crystalsvg" not found. calibre Registro de depuración calibre 5.12 embedded-python: False is64bit: True Linux-5.10.0-13-amd64-x86_64-with-glibc2.31 Linux ('64bit', 'ELF') ('Linux', '5.10.0-13-amd64', '#1 SMP Debian 5.10.106-1 (2022-03-17)') Python 3.9.2 Interface language: es Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (1, 47, 0) && DeDRM (7, 2, 1) && Package KFX (from KFX Input) (1, 47, 0) && KFX metadata reader (from KFX Input) (1, 47, 0) && KFX Input (1, 47, 0) && Set KFX metadata (from KFX Output) (1, 60, 0) && KFX Output (1, 60, 0) && Kindle Collections (1, 7, 26) && Obok DeDRM (7, 2, 1) calibre 5.12 embedded-python: False is64bit: True Linux-5.10.0-13-amd64-x86_64-with-glibc2.31 Linux ('64bit', 'ELF') ('Linux', '5.10.0-13-amd64', '#1 SMP Debian 5.10.106-1 (2022-03-17)') Python 3.9.2 Interface language: es Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (1, 47, 0) && DeDRM (7, 2, 1) && Package KFX (from KFX Input) (1, 47, 0) && KFX metadata reader (from KFX Input) (1, 47, 0) && KFX Input (1, 47, 0) && Set KFX metadata (from KFX Output) (1, 60, 0) && KFX Output (1, 60, 0) && Kindle Collections (1, 7, 26) && Obok DeDRM (7, 2, 1) Not controlling automatic hidpi scaling devicePixelRatio: 1.0 logicalDpi: 96.0 x 96.25263157894737 physicalDpi: 102.23899371069182 x 102.35820895522387 Using calibre Qt style: True [0.00] Starting up... [0.01] Showing splash screen... [0.09] splash screen shown [0.09] Initializing db... [0.13] db initialized [0.13] 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 Loaded cached store plugin for: Project Gutenberg at version: 8 Loaded cached store plugin for: Kobo at version: 8 Looking for desktop notifier support from: org.freedesktop.Notifications org.freedesktop.Notifications found in 0.0 seconds [0.75] main UI initialized... [0.75] Hiding splash screen Starting QuickView qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 1127, resource id: 25167566, major code: 40 (TranslateCoords), minor code: 0 qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 2143, resource id: 25167583, major code: 40 (TranslateCoords), minor code: 0 Gather KFX-ZIP (from KFX Input) 1.47.0: Importing /home/javier/TMP/Una propuesta para humillar a España (Spanish Edition)_B086DQNSXS.sdr/Una propuesta para humillar a España (Spanish Edition)_B086DQNSXS.kfx Gather KFX-ZIP (from KFX Input): Cannot locate some files needed for the book. KFX files must remain in their original folder structure for successful import. Gather KFX-ZIP (from KFX Input): Gathered 1 file(s) as /tmp/calibre_5.12.0_tmp_s4u6gpix/w5owudpd.kfx-zip DeDRM v7.2.1: Trying to decrypt w5owudpd.kfx-zip Using Library AlfCrypto DLL/DYLIB/SO Using Library AlfCrypto DLL/DYLIB/SO Running file type plugin DeDRM failed with traceback: Traceback (most recent call last): File "calibre_plugins.dedrm.kfxdedrm", line 18, in from ion import DrmIon, DrmIonVoucher File "/tmp/calibre_5.12.0_tmp_s4u6gpix/gnr6mf8cplugin_unzip/ion.py", line 33, in from Crypto.Cipher import AES ModuleNotFoundError: No module named 'Crypto' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib/calibre/calibre/customize/ui.py", line 172, in _run_filetype_plugins nfp = plugin.run(nfp) or nfp File "calibre_plugins.dedrm.__init__", line 633, in run decrypted_ebook = self.KindleMobiDecrypt(path_to_ebook) File "calibre_plugins.dedrm.__init__", line 527, in KindleMobiDecrypt import calibre_plugins.dedrm.k4mobidedrm File "/usr/lib/calibre/calibre/customize/zipplugin.py", line 192, in exec_module exec(compiled, module.__dict__) File "calibre_plugins.dedrm.k4mobidedrm", line 88, in from calibre_plugins.dedrm import kfxdedrm File "/usr/lib/calibre/calibre/customize/zipplugin.py", line 192, in exec_module exec(compiled, module.__dict__) File "calibre_plugins.dedrm.kfxdedrm", line 20, in from calibre_plugins.dedrm.ion import DrmIon, DrmIonVoucher File "/usr/lib/calibre/calibre/customize/zipplugin.py", line 192, in exec_module exec(compiled, module.__dict__) File "calibre_plugins.dedrm.ion", line 33, in from Crypto.Cipher import AES ModuleNotFoundError: No module named 'Crypto' Package KFX (from KFX Input) 1.47.0: Packaging /tmp/calibre_5.12.0_tmp_s4u6gpix/w5owudpd.kfx-zip Processing container: Una propuesta para humillar a España (Spanish Edition)_B086DQNSXS.kfx Running file type plugin Package KFX (from KFX Input) failed with traceback: Traceback (most recent call last): File "/usr/lib/calibre/calibre/customize/ui.py", line 172, in _run_filetype_plugins nfp = plugin.run(nfp) or nfp File "calibre_plugins.kfx_input.package_filetype", line 21, in run return self.run_kfx(path_to_ebook) File "calibre_plugins.kfx_input.package_filetype", line 32, in run_kfx kfx_data = YJ_Book(path_to_ebook).convert_to_single_kfx() File "calibre_plugins.kfx_input.kfxlib.yj_book", line 83, in convert_to_single_kfx self.decode_book() File "calibre_plugins.kfx_input.kfxlib.yj_book", line 210, in decode_book container = self.get_container(datafile) File "calibre_plugins.kfx_input.kfxlib.yj_book", line 317, in get_container raise KFXDRMError("Book container %s has DRM and cannot be converted" % datafile.name) calibre_plugins.kfx_input.kfxlib.utilities.KFXDRMError: Book container Una propuesta para humillar a España (Spanish Edition)_B086DQNSXS.kfx has DRM and cannot be converted KFX metadata reader (from KFX Input) activated for /tmp/calibre_5.12.0_tmp_s4u6gpix/6ej42cpl_add_books/0/Una propuesta para humillar a España (Spanish Edition)_B086DQNSXS.kfx-zip Traceback (most recent call last): File "/usr/lib/calibre/calibre/customize/ui.py", line 428, in get_file_type_metadata mi = plugin.get_metadata(stream, ftype.lower().strip()) File "calibre_plugins.kfx_input.metadata_reader", line 28, in get_metadata md = YJ_Book(stream).get_metadata() File "calibre_plugins.kfx_input.kfxlib.yj_book", line 148, in get_metadata raise Exception("Failed to locate a KFX container with metadata") Exception: Failed to locate a KFX container with metadata [12.26] splash screen hidden [12.26] Started up in 12.26 seconds with 410 books Added Una propuesta para humillar a España (Spanish Edition) B086DQNSXS to db in: 1.1 Added 1 books in 1.6 seconds Icon theme "crystalsvg" not found. Hspell: can't open /usr/share/hspell/hebrew.wgz.sizes. kf.sonnet.clients.hspell: HSpellDict::HSpellDict: Init failed Icon theme "crystalsvg" not found. ```
ElleKayEm commented 2 years ago

A couple problems here: First, you should try the official Linux calibre..this one is not using calibre's embedded python. Also this looks like a KFX book directly from a Kindle which can't be decrypted. If it's an E-ink Kindle (not a Fire), then download the older format from the website choosing your Kindle for the device.