noDRM / DeDRM_tools

DeDRM tools for ebooks
6.96k stars 306 forks source link

DeDRM seems to not be running when importing an EPUB #302

Open irvinktang opened 1 year ago

irvinktang commented 1 year ago

Calibre 6.14 Ubuntu 22.04.1 LTS DeDRM 10.0.3 Importing books into Adobe Digital Editions 1.7.2

As I was making this issue I realized that the download link for ADE from eBooks.com was for ADE 1.7.2...is the tool able to remove DRMs from EPUBs imported into such an old version of ADE? I just upgraded to ADE 4.5 but now can't read those books in that newer version of ADE (I've reached out to eBooks.com support for this). I'll try to reimport the books into ADE 4.5 once eBooks.com gets back to me on how to resolve.

In the meantime, here are the logs when I run calibre in debug mode and import the epub. It doesn't look like the DeDRM tool is even running when I import:

ApplicationPaletteChange event ignored
Using calibre Qt style: True
calibre Debug log
calibre 6.14  embedded-python: True
Linux-5.19.0-32-generic-x86_64-with-glibc2.35 Linux ('64bit', 'ELF')
('Linux', '5.19.0-32-generic', '#33~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon Jan 30 17:03:34 UTC 2')
Python 3.10.1
Interface language: None
Successfully initialized third party plugins: Obok DeDRM (10, 0, 3)
calibre 6.14  embedded-python: True
Linux-5.19.0-32-generic-x86_64-with-glibc2.35 Linux ('64bit', 'ELF')
('Linux', '5.19.0-32-generic', '#33~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon Jan 30 17:03:34 UTC 2')
Python 3.10.1
Interface language: None
Successfully initialized third party plugins: Obok DeDRM (10, 0, 3)
QPA platform: wayland
devicePixelRatio: 1.0
logicalDpi: 96.0 x 96.0
physicalDpi: 157.31612903225806 x 161.36470588235292
[0.00] Starting up...
[0.01] Showing splash screen...
[0.11] splash screen shown
[0.11] Initializing db...
[0.14] db initialized
[0.14] 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
[1.21] main UI initialized...
[1.21] Hiding splash screen
Starting QuickView
[4.13] splash screen hidden
[4.13] Started up in 4.13 seconds with 2 books
['zenity', '--modal', '--file-selection', '--title=Select books', '--separator=\n', '--attach=2', '--filename=/home/irvin/Documents/My Digital Editions/.fgdfg.gdfhjdhf*&^839', '--file-filter=Books | *.lrf *.rtf *.lit *.txt *.txtz *.text *.htm *.xhtm *.html *.htmlz *.xhtml *.pdf *.pdb *.updb *.pdr *.prc *.mobi *.azw *.doc *.epub *.fb2 *.fbz *.djv *.djvu *.lrx *.cbr *.cb7 *.cbz *.cbc *.oebzip *.rb *.imp *.odt *.chm *.tpz *.azw1 *.pml *.pmlz *.mbp *.tan *.snb *.xps *.oxps *.azw4 *.book *.zbf *.pobi *.docx *.docm *.md *.textile *.markdown *.ibook *.ibooks *.iba *.azw3 *.ps *.kepub *.kfx *.kpf', '--file-filter=EPUB books | *.epub *.kepub', '--file-filter=Kindle books | *.mobi *.prc *.azw *.azw3 *.kfx *.tpz *.azw1 *.azw4', '--file-filter=PDF books | *.pdf *.azw4', '--file-filter=HTML books | *.htm *.html *.xhtm *.xhtml', '--file-filter=LIT books | *.lit', '--file-filter=Text books | *.txt *.text *.rtf *.md *.markdown *.textile *.txtz', '--file-filter=Comics | *.cbz *.cbr *.cbc', '--file-filter=Archives | *.zip *.rar', '--file-filter=Wordprocessor files | *.odt *.doc *.docx', '--file-filter=All files | *', '--multiple']
Added The Dark Tower I: The Gunslinger to db in: 0.1
Added 1 books in 0.6 seconds

Any insight is appreciated! Thank you

ElleKayEm commented 1 year ago

You only have Obok installed. For Adobe DRM, you need the regular DeDRM plugin.

irvinktang commented 1 year ago

ah, didn't realize this. thank you!

Okay seeing more information in the logs now. Will try to debug based off existing issues.

irvinktang commented 1 year ago

Seeing this now:

ApplicationPaletteChange event ignored
Using calibre Qt style: True
calibre Debug log
calibre 6.14  embedded-python: True
Linux-5.19.0-32-generic-x86_64-with-glibc2.35 Linux ('64bit', 'ELF')
('Linux', '5.19.0-32-generic', '#33~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon Jan 30 17:03:34 UTC 2')
Python 3.10.1
Interface language: None
Successfully initialized third party plugins: DeDRM (10, 0, 3) && Obok DeDRM (10, 0, 3)
calibre 6.14  embedded-python: True
Linux-5.19.0-32-generic-x86_64-with-glibc2.35 Linux ('64bit', 'ELF')
('Linux', '5.19.0-32-generic', '#33~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon Jan 30 17:03:34 UTC 2')
Python 3.10.1
Interface language: None
Successfully initialized third party plugins: DeDRM (10, 0, 3) && Obok DeDRM (10, 0, 3)
QPA platform: wayland
devicePixelRatio: 1.0
logicalDpi: 96.0 x 96.0
physicalDpi: 157.31612903225806 x 161.36470588235292
[0.00] Starting up...
[0.00] Showing splash screen...
[0.07] splash screen shown
[0.07] Initializing db...
[0.08] db initialized
[0.08] 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
[0.76] main UI initialized...
[0.76] Hiding splash screen
Starting QuickView
DeDRM v10.0.3: Trying to decrypt The Dark Tower I.epub
DeDRM v10.0.3: Verifying zip archive integrity
DeDRM v10.0.3: The Dark Tower I.epub is a secure Adobe Adept ePub for UUID 86c2a334-2697-4b93-a988-dd1df8dc8c35
DeDRM v10.0.3: Looking for new default Adobe Digital Editions Keys after 0.2 seconds
Fatal Python error: init_sys_streams: can't initialize sys standard streams
OSError: [WinError 6] Invalid handle

Current thread 0x00000594 (most recent call first):
058c:fixme:kernelbase:AppPolicyGetProcessTerminationMethod FFFFFFFA, 0062F358
Application could not be started, or no application associated with the specified file.
ShellExecuteEx failed: File not found.

DeDRM v10.0.3: wine python3.exe is not python3
[2.48] splash screen hidden
[2.48] Started up in 2.48 seconds with 2 books
['zenity', '--modal', '--file-selection', '--title=Select books', '--separator=\n', '--attach=2', '--filename=/home/irvin/Documents/My Digital Editions/.fgdfg.gdfhjdhf*&^839', '--file-filter=Books | *.lrf *.rtf *.lit *.txt *.txtz *.text *.htm *.xhtm *.html *.htmlz *.xhtml *.pdf *.pdb *.updb *.pdr *.prc *.mobi *.azw *.doc *.epub *.fb2 *.fbz *.djv *.djvu *.lrx *.cbr *.cb7 *.cbz *.cbc *.oebzip *.rb *.imp *.odt *.chm *.tpz *.azw1 *.pml *.pmlz *.mbp *.tan *.snb *.xps *.oxps *.azw4 *.book *.zbf *.pobi *.docx *.docm *.md *.textile *.markdown *.ibook *.ibooks *.iba *.azw3 *.ps *.kepub *.kfx *.kpf', '--file-filter=EPUB books | *.epub *.kepub', '--file-filter=Kindle books | *.mobi *.prc *.azw *.azw3 *.kfx *.tpz *.azw1 *.azw4', '--file-filter=PDF books | *.pdf *.azw4', '--file-filter=HTML books | *.htm *.html *.xhtm *.xhtml', '--file-filter=LIT books | *.lit', '--file-filter=Text books | *.txt *.text *.rtf *.md *.markdown *.textile *.txtz', '--file-filter=Comics | *.cbz *.cbr *.cbc', '--file-filter=Archives | *.zip *.rar', '--file-filter=Wordprocessor files | *.odt *.doc *.docx', '--file-filter=All files | *', '--multiple']
Application could not be started, or no application associated with the specified file.
ShellExecuteEx failed: File not found.

DeDRM v10.0.3: wine python.exe is not python3
wine: failed to open "C:\\Python27\\python.exe": c0000135
DeDRM v10.0.3: wine C:\Python27\python.exe does not exist
DeDRM v10.0.3: Unable to find python3 executable in WINEPREFIX=""
DeDRM v10.0.3: Ultimately failed to decrypt after 1.0 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/customize/ui.py", line 187, in _run_filetype_plugins
  File "calibre_plugins.dedrm.__init__", line 1067, in run
    decrypted_ebook = self.ePubDecrypt(path_to_ebook)
  File "calibre_plugins.dedrm.__init__", line 665, in ePubDecrypt
    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.3: Ultimately failed to decrypt after 1.0 seconds. Read the FAQs at noDRM's repository: https://github.com/noDRM/DeDRM_tools/blob/master/FAQs.md
Added The Dark Tower I: The Gunslinger to db in: 0.1
Added 1 books in 1.5 seconds
Worker Launch took: 0.00 seconds

I tried installing Python but that didn't change anything. I also attempted to install DeASCM based off of other threads but can't seem to import the plug in for some reason:

calibre, version 6.14.0
ERROR: Unhandled exception: <b>InvalidPlugin</b>:The plugin in '/home/irvin/Documents/calibre_plugins/deascm/oscrypto.zip' is invalid. It does not contain a top-level __init__.py file

calibre 6.14  embedded-python: True
Linux-5.19.0-32-generic-x86_64-with-glibc2.35 Linux ('64bit', 'ELF')
('Linux', '5.19.0-32-generic', '#33~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon Jan 30 17:03:34 UTC 2')
Python 3.10.1
Interface language: None
Successfully initialized third party plugins: DeDRM (10, 0, 3) && Obok DeDRM (10, 0, 3)
Traceback (most recent call last):
  File "calibre/gui2/preferences/plugins.py", line 325, in add_plugin
  File "calibre/customize/ui.py", line 513, in add_plugin
  File "calibre/customize/ui.py", line 64, in load_plugin
  File "calibre/customize/zipplugin.py", line 298, in load
  File "calibre/customize/zipplugin.py", line 393, in _locate_code
calibre.customize.InvalidPlugin: The plugin in '/home/irvin/Documents/calibre_plugins/deascm/oscrypto.zip' is invalid. It does not contain a top-level __init__.py file
ElleKayEm commented 1 year ago

Yeah, it can be tricky to get things set up with Linux. Looks like you are loading the wrong file for the DeACSM plugin. With that one, don't unzip anything. Load DeACSM_0.0.16.zip into calibre.