apprenticeharper / DeDRM_tools

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

DeDRM Failure on Adobe Digital Editions on Linux #1058

Open MLutt opened 4 years ago

MLutt commented 4 years ago

Relevant log section:

DeDRM v6.7.0: Looking for new default Adobe Digital Editions Keys after 0.2 seconds
DeDRM v6.7.0: Running adobekey.py under Wine
DeDRM v6.7.0: Command line: 'wine python.exe "/home/markus/.config/calibre/plugins/DeDRM/libraryfiles/adobekey.py" "/home/markus/.config/calibre/plugins/DeDRM/libraryfiles/winekeysdir"'
[5.38] splash screen hidden
[5.38] Started up in 5.38 seconds with 2 books
0009:err:module:__wine_process_init L"C:\\windows\\system32\\python.exe" not found
DeDRM v6.7.0: Found and decrypted 0 key files
DeDRM v6.7.0: Exception when getting default Adobe Key after 1.3 seconds
Traceback (most recent call last):
  File "calibre_plugins.dedrm.__init__", line 357, in ePubDecrypt
IndexError: list index out of range
DeDRM v6.7.0: Ultimately failed to decrypt after 1.3 seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md
Running file type plugin DeDRM failed with traceback:
Traceback (most recent call last):
  File "/usr/lib/calibre/calibre/customize/ui.py", line 171, in _run_filetype_plugins
    nfp = plugin.run(nfp) or nfp
  File "calibre_plugins.dedrm.__init__", line 636, in run
  File "calibre_plugins.dedrm.__init__", line 407, in ePubDecrypt
DeDRMError: DeDRM v6.7.0: Ultimately failed to decrypt after 1.3 seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md
Added Bänder der Trauer to db in: 0.2
Added 1 books in 1.9 seconds
Warning: 'sandbox' is not in the list of known options, but still passed to Electron/Chromium.
MLutt commented 4 years ago

It works flawlessly on Windows, by reading over the log section again it seems to try a bogus wine operation...?

ElleKayEm commented 4 years ago

Here's the problem: 0009:err:module:__wine_process_init L"C:\windows\system32\python.exe" not found

You do need to have Python and PyCrypto installed under Wine. But people still seem to have trouble anyway. Some have had success running the key script from the command line manually and importing the key into the plugin themselves. Something similar to what you see in the log:

Command line: 'wine python.exe "/home/markus/.config/calibre/plugins/DeDRM/libraryfiles/adobekey.py" "/home/markus/.config/calibre/plugins/DeDRM/libraryfiles/winekeysdir"'

gsgleason commented 3 years ago

I got it working by installing python 3.7.9 for 32 bit windows. Only install for the current user (not all users) and select the option to add path.

I couldn't get pycrypto to install, so I installed openssl (Win32OpenSSL-1_1_1L.exe) from https://slproweb.com/products/Win32OpenSSL.html

I had to manually update the windows PATH in order for the dedrm tools to be able to use openssl. I ran "wine regedit" and added "C:\Program Files\OpenSSL-Win32\bin\;" to the front of HKEY_CURRENT_USER\Environment\PATH