apprenticeharper / DeDRM_tools

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

[QUESTION] WARNING: Error while saving in v 7.20 #1850

Open dvago opened 3 years ago

dvago commented 3 years ago

CheckList


Title

File fails to save, I tried to convert 3 documents which were provided via the Adobe Digital Editions version into PDF, for personal printing purposes only(printing exercise pages).

One of them fails with the following Log (see below)

My Environment

Calibre: 5.28.0

Kindle: Unknown

DeDRM: 7.20

Log

WARNING: Error while saving ```log calibre, version 5.28.0 WARNING: Error while saving: Failed to update metadata in some books, click "Show details" for more information Failed to update the metadata in the PDF format of: pdf name goes here by Unknown, with error: Traceback (most recent call last): File "calibre\utils\podofo\__init__.py", line 38, in set_metadata File "calibre\utils\ipc\simple_worker.py", line 256, in fork_job File "calibre\utils\ipc\simple_worker.py", line 181, in run_job File "calibre\utils\ipc\simple_worker.py", line 120, in communicate calibre.utils.ipc.simple_worker.WorkerError: Worker failed During handling of the above exception, another exception occurred: Traceback (most recent call last): File "calibre\customize\ui.py", line 452, in set_file_type_metadata File "calibre\customize\builtins.py", line 519, in set_metadata File "calibre\ebooks\metadata\pdf.py", line 187, in set_metadata File "calibre\utils\podofo\__init__.py", line 42, in set_metadata Exception: Failed to set PDF metadata in (pdf name goes here): Traceback (most recent call last): File "calibre\utils\ipc\simple_worker.py", line 304, in main File "calibre\utils\podofo\__init__.py", line 99, in set_metadata_ podofo.Error: ePdfError_UnsupportedFilter File: C:\t\t\podofo-fwpgsyo1\src\base\PdfParser.cpp Line: 272 Unable to load objects from file. File: C:\t\t\podofo-fwpgsyo1\src\base\PdfParser.cpp Line: 1070 Error while loading object 4468 0 File: C:\t\t\podofo-fwpgsyo1\src\base\PdfEncrypt.cpp Line: 549 Unsupported encryption filter: EBX_HANDLER ```
ElleKayEm commented 3 years ago

Use DeDRM 7.2.1. And let's see a debug log of adding the epub to calibre. That's when DRM is removed.

dvago commented 3 years ago

I tried with DeDRM 7.2.1 it does import the document within the list of books however I can see the process is failing, in fact when I try to "save to disk" the error below appears

It seems it's failing to save the metadata into the document itself, so when I open it on Google Chrome from Calibre the file shows as blank and keeps reloading with a generic failure

calibre, version 5.28.0
WARNING: Error while saving: Failed to update metadata in some books, click "Show details" for more information

Failed to update the metadata in the PDF format of: pdf name goes here by Unknown, with error:
    Traceback (most recent call last):
      File "calibre\utils\podofo\__init__.py", line 38, in set_metadata
      File "calibre\utils\ipc\simple_worker.py", line 256, in fork_job
      File "calibre\utils\ipc\simple_worker.py", line 181, in run_job
      File "calibre\utils\ipc\simple_worker.py", line 120, in communicate
    calibre.utils.ipc.simple_worker.WorkerError: Worker failed

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "calibre\customize\ui.py", line 452, in set_file_type_metadata
      File "calibre\customize\builtins.py", line 519, in set_metadata
      File "calibre\ebooks\metadata\pdf.py", line 187, in set_metadata
      File "calibre\utils\podofo\__init__.py", line 42, in set_metadata
    Exception: Failed to set PDF metadata in (pdf name goes here): Traceback (most recent call last):
      File "calibre\utils\ipc\simple_worker.py", line 304, in main
      File "calibre\utils\podofo\__init__.py", line 99, in set_metadata_
    podofo.Error: ePdfError_UnsupportedFilter
    File: C:\t\t\podofo-fwpgsyo1\src\base\PdfParser.cpp Line: 272 Unable to load objects from file.
    File: C:\t\t\podofo-fwpgsyo1\src\base\PdfParser.cpp Line: 1070 Error while loading object 4468 0

    File: C:\t\t\podofo-fwpgsyo1\src\base\PdfEncrypt.cpp Line: 549 Unsupported encryption filter: EBX_HANDLER
dvago commented 3 years ago

Also, when I try to open the file via the Calibre previewer this is the log that comes out:

calibre, version 5.28.0
ERROR: Loading book failed: Failed to open the book at My path + pdf name goes here.pdf. Click "Show details" for more info.

Failed to convert book: My path + pdf name goes here.pdf with error:
DeDRM v7.2.1: Trying to decrypt My path + pdf name goes here.pdf
DeDRM v7.2.1:  My path + pdf name goes here.pdf is a PDF ebook
DeDRM v7.2.1: Trying Encryption key default_key
error writing pdf: max() arg is an empty sequence
DeDRM v7.2.1: Failed to decrypt with key default_key after 0.1 seconds
DeDRM v7.2.1: Looking for new default Adobe Digital Editions Keys after 0.1 seconds
Found 1 keys
DeDRM v7.2.1: Trying a new default key
error writing pdf: max() arg is an empty sequence
DeDRM v7.2.1: Failed to decrypt with new default key after 0.2 seconds
DeDRM v7.2.1: Ultimately failed to decrypt after 0.2 seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md
Syntax Error: Couldn't find the 'EBX_HANDLER' security handler

pdfinfo errored out with return code: 1
InputFormatPlugin: PDF Input running
on  My path + pdf name goes here.pdf
Failed to run pipe worker with command: from calibre.srv.render_book import viewer_main; viewer_main()
Traceback (most recent call last):
  File "calibre\customize\ui.py", line 433, in get_file_type_metadata
  File "calibre\customize\builtins.py", line 317, in get_metadata
  File "calibre\ebooks\metadata\pdf.py", line 126, in get_metadata
ValueError: Could not read info dict from PDF
Running file type plugin DeDRM failed with traceback:
Traceback (most recent call last):
  File "calibre\customize\ui.py", line 176, in _run_filetype_plugins
  File "calibre_plugins.dedrm.__init__", line 640, in run
  File "calibre_plugins.dedrm.__init__", line 515, in PDFDecrypt
calibre_plugins.dedrm.DeDRMError: DeDRM v7.2.1: Ultimately failed to decrypt after 0.2 seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md
Traceback (most recent call last):
  File "runpy.py", line 194, in _run_module_as_main
  File "runpy.py", line 87, in _run_code
  File "site.py", line 82, in <module>
  File "site.py", line 77, in main
  File "site.py", line 49, in run_entry_point
  File "calibre\utils\ipc\worker.py", line 197, in main
  File "<string>", line 1, in <module>
  File "calibre\srv\render_book.py", line 824, in viewer_main
  File "calibre\srv\render_book.py", line 815, in render_for_viewer
  File "calibre\srv\render_book.py", line 792, in render
  File "calibre\ebooks\oeb\iterator\book.py", line 63, in extract_book
  File "calibre\customize\conversion.py", line 245, in __call__
  File "calibre\ebooks\conversion\plugins\pdf_input.py", line 54, in convert
  File "calibre\ebooks\pdf\pdftohtml.py", line 83, in pdftohtml
calibre.ebooks.ConversionError: pdftohtml failed with return code: 1
Syntax Error: Couldn't find the 'EBX_HANDLER' security handler
Exception ignored in: <function NativeFunction.__del__ at 0x080066A0>
Traceback (most recent call last):
  File "calibre_plugins.dedrm.adobekey", line 268, in __del__
TypeError: 'NoneType' object is not callable
Exception ignored in: <function NativeFunction.__del__ at 0x080066A0>
Traceback (most recent call last):
  File "calibre_plugins.dedrm.adobekey", line 268, in __del__
TypeError: 'NoneType' object is not callable
ElleKayEm commented 3 years ago

It's a pdf to begin with? Give calibre 4.23 and DeDRM 6.8.1 a try.

dvago commented 3 years ago

Oh great, it worked thanks a lot for your help!

enricorox commented 2 years ago

It's a pdf to begin with? Give calibre 4.23 and DeDRM 6.8.1 a try.

These solved for me the Unsupported encryption filter: EBX_HANDLER error

ElleKayEm commented 2 years ago

Recommend DeDRM 10.0.3 now.