noDRM / DeDRM_tools

DeDRM tools for ebooks
7.28k stars 323 forks source link

DeDRM doesn't work on GNU/Linux Ubuntu #69

Open tmv713 opened 2 years ago

tmv713 commented 2 years ago

Hello, I have previous experience using DeDRM (just less than a week ago I used it on a puppy linux pc) now I have a fresh install of Ubuntu 22.04 and after installing it, transferring the books after the installation it still shows the DRM message.

Log output:

`Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway. calibre Registro de depuración calibre 5.37 embedded-python: False is64bit: True Linux-5.15.0-27-generic-x86_64-with-glibc2.35 Linux ('64bit', 'ELF') ('Linux', '5.15.0-27-generic', '#28-Ubuntu SMP Thu Apr 14 04:55:28 UTC 2022') Python 3.10.4 Interface language: es Successfully initialized third party plugins: DeDRM (10, 0, 2) calibre 5.37 embedded-python: False is64bit: True Linux-5.15.0-27-generic-x86_64-with-glibc2.35 Linux ('64bit', 'ELF') ('Linux', '5.15.0-27-generic', '#28-Ubuntu SMP Thu Apr 14 04:55:28 UTC 2022') Python 3.10.4 Interface language: es Successfully initialized third party plugins: DeDRM (10, 0, 2) Turning on automatic hidpi scaling devicePixelRatio: 1.0 logicalDpi: 96.0 x 96.0 physicalDpi: 111.43225806451612 x 114.74823529411763 Using calibre Qt style: True [0.00] Starting up... [0.01] Showing splash screen... [0.10] splash screen shown [0.10] Initializing db... [0.14] db initialized [0.14] Constructing main UI... [1.71] main UI initialized... [1.71] Hiding splash screen Starting QuickView DeDRM v10.0.2: Trying to decrypt La cruzada de los niños (Vientos del Pueblo) (Spanish Edition).azw3 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.37.0_tmp_a8fn8mx0/rcmsiy6yplugin_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 175, in _run_filetype_plugins nfp = plugin.run(nfp) or nfp File "calibre_plugins.dedrm.init", line 888, in run decrypted_ebook = self.KindleMobiDecrypt(path_to_ebook) File "calibre_plugins.dedrm.init", line 782, in KindleMobiDecrypt import calibre_plugins.dedrm.k4mobidedrm File "/usr/lib/calibre/calibre/customize/zipplugin.py", line 191, 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 191, 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 191, 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'

Found device nodes: /dev/sdb1 None None Syncing cover thumbnails to workaround amazon cover bug Job: 0 Obtener información del dispositivo started DeviceJob: 0 Obtener información del dispositivo done, calling callback DeviceJob: 0 Obtener información del dispositivo callback returned Job: 1 Establecer información de la biblioteca started DeviceJob: 1 Establecer información de la biblioteca done, calling callback DeviceJob: 1 Establecer información de la biblioteca callback returned Job: 2 Obtener lista de libros en el dispositivo started DEBUG: 0.0 USBMS: Fetching list of books from device. Device= KINDLE2 oncard= None DEBUG: 0.0 USBMS: dirs are: /media/tmv/Kindle/ documents DEBUG: 0.1 USBMS: scan from root False /media/tmv/Kindle/documents DEBUG: 0.1 USBMS: count found in cache: 33, count of files in metadata: 33, need_sync: False DEBUG: 0.1 USBMS: Finished fetching list of books from device. oncard= None DEBUG: 0.1 USBMS: Fetching list of books from device. Device= KINDLE2 oncard= carda DEBUG: 0.1 USBMS: Fetching list of books from device. Device= KINDLE2 oncard= cardb DeviceJob: 2 Obtener lista de libros en el dispositivo done, calling callback DeviceJob: metadata_downloaded: Starting set_books_in_library DeviceJob: set_books_in_library: books to process= 33 DeviceJob: set_books_in_library finished: time= 0.03635454177856445 DeviceJob: metadata_downloaded: updating views DeviceJob: metadata_downloaded: syncing DeviceJob: metadata_downloaded: refreshing ondevice DeviceJob: metadata_downloaded: sending metadata_available signal DeviceJob: 2 Obtener lista de libros en el dispositivo callback returned Job: 0 Obtener información del dispositivo finished No hay detalles disponibles. Job: 2 Obtener lista de libros en el dispositivo finished No hay detalles disponibles. Job: 1 Establecer información de la biblioteca finished No hay detalles disponibles. [17.06] splash screen hidden [17.06] Started up in 17.06 seconds with 2 books Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway. Added La cruzada de los niños (Vientos del Pueblo) (Spanish Edition) to db in: 0.1 Added 1 books in 1.3 seconds Worker Launch took: 0.00 seconds`

tmv713 commented 2 years ago

I never use git...no idea why putting the log with the "code" format didn't work.

ElleKayEm commented 2 years ago

Try the official Linux calibre .

ElleKayEm commented 2 years ago

Try the official Linux calibre.

Liamwil3 commented 2 years ago

Some details are missing, It looks like you are trying to decrypt some kindle book and are having problems with kfx. Maybe this link could help you: https://reddragdiva.dreamwidth.org/609382.html

sralmai commented 2 years ago

The plugin makes an assumption about a library it expects you to have installed.

Run

pip3 install PyCrypto

then restart calibre and try again.

ElleKayEm commented 2 years ago

If you use the official Linux calibre, it will use calibre's embedded Python which has everything the plugin needs.

tmv713 commented 2 years ago

The plugin makes an assumption about a library it expects you to have installed.

Run

pip3 install PyCrypto

then restart calibre and try again.

Hello, thanks! this worked!

One thing happening with the calibre download on ubuntu 22.04 is that it's now working, people on the official ubuntu forums recommend the repo version: https://askubuntu.com/questions/1403693/ebook-viewer-qt-webengine-render-process-has-crashed-ubuntu-22-04

sralmai commented 2 years ago

Glad it is working @tmv713 .

For full context, I am using the default debian package. (Specifically, calibre_5.12.0+dfsg-1+deb11u1_all.deb.)