apprenticeharper / DeDRM_tools

DeDRM tools for ebooks
14.43k stars 1.49k forks source link

[QUESTION] Why can't deDRM let me read AZW4 books? When I double-click the title, Calibre just reimports the book. #1355

Open hub2git opened 3 years ago

hub2git commented 3 years ago

CheckList


Title

My Environment

Calibre: 5.4.1

Kindle: 1:17.1 (44183)

DeDRM: 7.0.0

Log

Log Title ```log calibre Debug log calibre 5.4.1 embedded-python: True is64bit: True Linux-5.4.0-52-generic-x86_64-with-glibc2.2.5 Linux ('64bit', 'ELF') ('Linux', '5.4.0-52-generic', '#57-Ubuntu SMP Thu Oct 15 10:57:00 UTC 2020') Python 3.8.5 Interface language: None Failed to initialize plugin: '/home/me/.config/calibre/plugins/Goodreads More Tags.zip' Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (1, 35, 0) && DeDRM (7, 0, 0) && Package KFX (from KFX Input) (1, 35, 0) && Annotations (1, 13, 0) && EpubCheck (0, 2, 3) && Extract ISBN (1, 5, 0) && Find Duplicates (1, 8, 3) && Goodreads (1, 5, 1) && KFX metadata reader (from KFX Input) (1, 35, 0) && KFX Input (1, 35, 0) && KePub Metadata Reader (3, 2, 9) && KePub Metadata Writer (3, 2, 12) && KePub Output (3, 4, 1) && KindleUnpack - The Plugin (0, 82, 3) && Kobo Books (1, 8, 0) && Kobo Utilities (2, 11, 8) && KoboTouchExtended (3, 4, 1) && Modify ePub (1, 6, 1) && Obok DeDRM (6, 7, 0) && Quality Check (1, 10, 1) && Recoll Full Text Search (1, 0, 1) calibre 5.4.1 embedded-python: True is64bit: True Linux-5.4.0-52-generic-x86_64-with-glibc2.2.5 Linux ('64bit', 'ELF') ('Linux', '5.4.0-52-generic', '#57-Ubuntu SMP Thu Oct 15 10:57:00 UTC 2020') Python 3.8.5 Interface language: None Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (1, 35, 0) && DeDRM (7, 0, 0) && Package KFX (from KFX Input) (1, 35, 0) && Annotations (1, 13, 0) && EpubCheck (0, 2, 3) && Extract ISBN (1, 5, 0) && Find Duplicates (1, 8, 3) && Goodreads (1, 5, 1) && KFX metadata reader (from KFX Input) (1, 35, 0) && KFX Input (1, 35, 0) && KePub Metadata Reader (3, 2, 9) && KePub Metadata Writer (3, 2, 12) && KePub Output (3, 4, 1) && KindleUnpack - The Plugin (0, 82, 3) && Kobo Books (1, 8, 0) && Kobo Utilities (2, 11, 8) && KoboTouchExtended (3, 4, 1) && Modify ePub (1, 6, 1) && Obok DeDRM (6, 7, 0) && Quality Check (1, 10, 1) && Recoll Full Text Search (1, 0, 1) Turning on automatic hidpi scaling devicePixelRatio: 1.0 logicalDpi: 96.0 x 96.0 physicalDpi: 100.86162790697674 x 100.55257731958763 Using calibre Qt style: True [0.00] Starting up... [0.00] Showing splash screen... [0.09] splash screen shown [0.09] Initializing db... [0.92] db initialized [0.92] Constructing main UI... DEBUG: 0.0 Annotations plugin: Error loading libiMobileDevice. This hasn't worked for a while, and is blacklisted in calibre v3. DEBUG: 0.0 Annotations plugin: Error is: No module named 'calibre.devices.idevice' DEBUG: 0.0 Annotations::reader_app_support.py - loading translations DEBUG: 0.0 Annotations::common_utils.py - loading translations DEBUG: 0.0 Annotations::appearance.py - loading translations DEBUG: 0.0 Annotations::config.py - loading translations DEBUG: 0.0 Annotations::annotated_books.py - loading translations DEBUG: 0.1 Annotations::action.py - loading translations DEBUG: 0.0 KoboUtilites::action.py - loading translations DEBUG: 0.0 KoboUtilites::dialogs.py - loading translations DEBUG: 0.0 KoboUtilites::action.py - loading translations Looking for desktop notifier support from: org.freedesktop.Notifications org.freedesktop.Notifications found in 0.0 seconds DEBUG: 2.0 No Kobo Touch, Glo or Mini appears to be connected DEBUG: 2.0 rebuild_menus - self.supports_ratings=None, self.supports_tiles=None DEBUG: 2.0 KoboUtilities:set_toolbar_button_tooltip - start: text='None' DEBUG: 2.0 KoboUtilities:set_toolbar_button_tooltip - setting to text='Utilities to use with Kobo ereaders Driver: KoboTouchExtended' /home/jc/text/Calibre library is not a valid directory to watch for new ebooks, ignoring [3.52] main UI initialized... [3.52] Hiding splash screen Starting QuickView DeDRM v7.0.0: Trying to decrypt B07M9LMQ9S_EBOK.azw4 Using Library AlfCrypto DLL/DYLIB/SO Using Library AlfCrypto DLL/DYLIB/SO [19.83] splash screen hidden [19.83] Started up in 19.83 seconds with 10343 books Debugging DND event x-special/gnome-icon-list 143 b'file:///home/me/.PlayOnLinux/wineprefix/amazon_kindle/drive_c/users/me/My%20Documents/My%20Kindle%20Content/B07M9LMQ9S_EBOK.azw4\r0:-16:793:21\r\n' text/uri-list 130 b'file:///home/me/.PlayOnLinux/wineprefix/amazon_kindle/drive_c/users/me/My%20Documents/My%20Kindle%20Content/B07M9LMQ9S_EBOK.azw4\r\n' text/plain 130 b'file:///home/me/.PlayOnLinux/wineprefix/amazon_kindle/drive_c/users/me/My%20Documents/My%20Kindle%20Content/B07M9LMQ9S_EBOK.azw4\r\n' COMPOUND_TEXT 130 b'file:///home/me/.PlayOnLinux/wineprefix/amazon_kindle/drive_c/users/me/My%20Documents/My%20Kindle%20Content/B07M9LMQ9S_EBOK.azw4\r\n' text/plain;charset=utf-8 130 b'file:///home/me/.PlayOnLinux/wineprefix/amazon_kindle/drive_c/users/me/My%20Documents/My%20Kindle%20Content/B07M9LMQ9S_EBOK.azw4\r\n' Firefox rurl: None None URLS: ['file:///home/me/.PlayOnLinux/wineprefix/amazon_kindle/drive_c/users/me/My%20Documents/My%20Kindle%20Content/B07M9LMQ9S_EBOK.azw4'] Paths: ['/home/me/.PlayOnLinux/wineprefix/amazon_kindle/drive_c/users/me/My Documents/My Kindle Content/B07M9LMQ9S_EBOK.azw4'] Extensions: frozenset({'azw4'}) Debugging DND event x-special/gnome-icon-list 142 b'file:///home/me/.PlayOnLinux/wineprefix/amazon_kindle/drive_c/users/me/My%20Documents/My%20Kindle%20Content/B07M9LMQ9S_EBOK.azw4\r0:-6:793:21\r\n' text/uri-list 130 b'file:///home/me/.PlayOnLinux/wineprefix/amazon_kindle/drive_c/users/me/My%20Documents/My%20Kindle%20Content/B07M9LMQ9S_EBOK.azw4\r\n' text/plain 130 b'file:///home/me/.PlayOnLinux/wineprefix/amazon_kindle/drive_c/users/me/My%20Documents/My%20Kindle%20Content/B07M9LMQ9S_EBOK.azw4\r\n' COMPOUND_TEXT 130 b'file:///home/me/.PlayOnLinux/wineprefix/amazon_kindle/drive_c/users/me/My%20Documents/My%20Kindle%20Content/B07M9LMQ9S_EBOK.azw4\r\n' text/plain;charset=utf-8 130 b'file:///home/me/.PlayOnLinux/wineprefix/amazon_kindle/drive_c/users/me/My%20Documents/My%20Kindle%20Content/B07M9LMQ9S_EBOK.azw4\r\n' Firefox rurl: None None URLS: ['file:///home/me/.PlayOnLinux/wineprefix/amazon_kindle/drive_c/users/me/My%20Documents/My%20Kindle%20Content/B07M9LMQ9S_EBOK.azw4'] Paths: ['/home/me/.PlayOnLinux/wineprefix/amazon_kindle/drive_c/users/me/My Documents/My Kindle Content/B07M9LMQ9S_EBOK.azw4'] Extensions: frozenset({'azw4'}) Running file type plugin DeDRM failed with traceback: Traceback (most recent call last): File "calibre/customize/ui.py", line 172, in _run_filetype_plugins File "calibre_plugins.dedrm.__init__", line 626, in run decrypted_ebook = self.KindleMobiDecrypt(path_to_ebook) File "calibre_plugins.dedrm.__init__", line 520, in KindleMobiDecrypt import calibre_plugins.dedrm.k4mobidedrm File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 671, in _load_unlocked File "calibre/customize/zipplugin.py", line 184, in exec_module File "calibre_plugins.dedrm.k4mobidedrm", line 88, in from calibre_plugins.dedrm import kfxdedrm File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 671, in _load_unlocked File "calibre/customize/zipplugin.py", line 184, in exec_module File "calibre_plugins.dedrm.kfxdedrm", line 22, in from calibre_plugins.dedrm import ion File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 671, in _load_unlocked File "calibre/customize/zipplugin.py", line 184, in exec_module File "calibre_plugins.dedrm.ion", line 39, in from Crypto.Cipher import AES File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 671, in _load_unlocked File "bypy-importer.py", line 154, in exec_module File "Crypto/Cipher/__init__.py", line 27, in File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 671, in _load_unlocked File "bypy-importer.py", line 154, in exec_module File "Crypto/Cipher/_mode_ecb.py", line 35, in File "Crypto/Util/_raw_api.py", line 308, in load_pycryptodome_raw_lib OSError: Cannot load native module 'Crypto.Cipher._raw_ecb': Trying '_raw_ecb.cpython-38-x86_64-linux-gnu.so': /opt/calibre/lib/calibre-extensions/python-lib.bypy.frozen/Crypto/Util/../Cipher/_raw_ecb.cpython-38-x86_64-linux-gnu.so: cannot open shared object file: Not a directory, Trying '_raw_ecb.abi3.so': /opt/calibre/lib/calibre-extensions/python-lib.bypy.frozen/Crypto/Util/../Cipher/_raw_ecb.abi3.so: cannot open shared object file: Not a directory, Trying '_raw_ecb.so': /opt/calibre/lib/calibre-extensions/python-lib.bypy.frozen/Crypto/Util/../Cipher/_raw_ecb.so: cannot open shared object file: Not a directory Failed to initialize plugin: '/home/me/.config/calibre/plugins/Goodreads More Tags.zip' qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 1697, resource id: 52436972, major code: 40 (TranslateCoords), minor code: 0 Traceback (most recent call last): File "calibre/customize/ui.py", line 703, in initialize_plugins File "calibre/customize/ui.py", line 61, in load_plugin File "calibre/customize/zipplugin.py", line 285, in load File "importlib/__init__.py", line 127, in import_module File "", line 1014, in _gcd_import File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 671, in _load_unlocked File "calibre/customize/zipplugin.py", line 184, in exec_module File "calibre_plugins.goodreads_more_tags.__init__", line 4, in from Queue import Queue ModuleNotFoundError: No module named 'Queue' Traceback (most recent call last): File "calibre/gui2/ui.py", line 134, in __init__ File "calibre/gui2/ui.py", line 148, in init_iaction File "calibre/customize/__init__.py", line 614, in load_actual_plugin File "importlib/__init__.py", line 127, in import_module File "", line 1014, in _gcd_import File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 671, in _load_unlocked File "calibre/customize/zipplugin.py", line 184, in exec_module File "calibre_plugins.obok_dedrm.action", line 24, in from calibre_plugins.obok_dedrm.dialogs import (SelectionDialog, DecryptAddProgressDialog, File "calibre/customize/zipplugin.py", line 184, in exec_module File "calibre_plugins.obok_dedrm.dialogs", line 30, in from calibre_plugins.obok_dedrm.utilities import (SizePersistedDialog, ImageTitleLayout, File "calibre/customize/zipplugin.py", line 184, in exec_module File "calibre_plugins.obok_dedrm.utilities", line 10, in from StringIO import StringIO ModuleNotFoundError: No module named 'StringIO' Traceback (most recent call last): File "calibre/gui2/ui.py", line 134, in __init__ File "calibre/gui2/ui.py", line 148, in init_iaction File "calibre/customize/__init__.py", line 614, in load_actual_plugin File "importlib/__init__.py", line 127, in import_module File "", line 1014, in _gcd_import File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 671, in _load_unlocked File "calibre/customize/zipplugin.py", line 184, in exec_module File "calibre_plugins.recoll_fulltext_search.ui", line 18, in from calibre_plugins.recoll_fulltext_search.main import RecollFulltextSearchDialog File "calibre/customize/zipplugin.py", line 184, in exec_module File "calibre_plugins.recoll_fulltext_search.main", line 17, in from PyQt4.Qt import (QDialog, QVBoxLayout, QPushButton, QMessageBox, QLabel, ModuleNotFoundError: No module named 'PyQt4' Added The Infographic Guide to American Government: A Visual Reference for Everything You Need to Know to db in: 0.2 Added 1 books in 3.0 seconds ```
ElleKayEm commented 3 years ago

DRM removal will work with calibre 4.23 and DeDRM 6.8. As for reading DRM-free AZW4 books with the calibre viewer, you'll need to set Preferences > Behavior and check AZW4 under the list of formats to use the internal viewer.

hub2git commented 3 years ago

@ElleKayEm Okay, I've put a check mark beside "AZW4" and now when I double click on an azw4 title, the internal viewer opens up. But why is there a "loading error" for some of my AZW4 titles?

Should I create a new issue for this?

ElleKayEm commented 3 years ago

Maybe because DeDRM 7 isn't ready yet? If it's a purchased book and you still can't remove the DRM with calibre 4.23 and DeDRM 6.8, then post a log in this issue.

hub2git commented 3 years ago

okay, i'll try to downgrade from DeDRM 7 to DeDRM 6.8. I don't remember why I went to 7 in the first place. maybe because calibre 5.x doesn't work with DeDRM 6.X?

ElleKayEm commented 3 years ago

Yes, the latest calibre which works with DeDRM 6.8 is 4.23.

apprenticeharper commented 3 years ago

The best thing to do with azw4 is to use the KindleUnpack plugin to extract the PDF from the AZW4 wrapper. Note that calibre tries to convert the PDF in AZW4 to ePub in order to display it, which can cause problems.

hub2git commented 3 years ago

Harper, thanks for replying. Does this mean that my problem is not because of upgrading to Calibre 5 without a working dedrm plugin?

ElleKayEm commented 3 years ago

Your issue is still appears to be DRM. Once the azw4 is DRM-free, you can use KindleUnpack.

apprenticeharper commented 3 years ago

Yes, pay attention to what ElleKayEm says. They have vast experience in handling error reports. I was just browsing and spotted an AZW4 mention.