noDRM / DeDRM_tools

DeDRM tools for ebooks
7.15k stars 321 forks source link

Obok Plugin Not Working on Some Books #318

Open mslmn opened 1 year ago

mslmn commented 1 year ago

Question / bug report

The plugin doesn't work for some books bought on rakuten jp. Other books work but some output a filename with random numbers and letters and no cover in Calibre. When I try open the book I get this error

calibre, version 6.14.0 ERROR: Loading book failed: Failed to open the book at /Users/temp/Calibre Library/Unknown/sp167tdv (3048)/sp167tdv - Unknown.epub. Click "Show details" for more info.

Failed to convert book: /Users/temp/Calibre Library/Unknown/sp167tdv (3048)/sp167tdv - Unknown.epub with error: Failed to initialize plugin: '/Users/temp/Library/Preferences/calibre/plugins/Goodreads More Tags.zip' Traceback (most recent call last): File "calibre/customize/ui.py", line 469, in get_file_type_metadata File "calibre/customize/builtins.py", line 175, in get_metadata File "calibre/ebooks/metadata/epub.py", line 237, in get_quick_metadata File "calibre/ebooks/metadata/epub.py", line 217, in get_metadata File "calibre/ebooks/metadata/epub.py", line 155, in read_bytes File "calibre/utils/zipfile.py", line 1005, in read File "calibre/utils/zipfile.py", line 1033, in open File "calibre/utils/zipfile.py", line 994, in getinfo KeyError: "There is no item named 'OPS/advanced.opf' in the archive" DeDRM v10.0.3: Trying to decrypt sp167tdv - Unknown.epub DeDRM v10.0.3: Verifying zip archive integrity DeDRM v10.0.3: Post-processing took 0.0 seconds DeDRM v10.0.3: Finished after 14.0 seconds InputFormatPlugin: EPUB Input running on /var/folders/hm/4jgkd02j2vx59g7v9sl7d1qr0000gn/C/calibre_6.14.0_tmp_m9l63ksq/m3tegku1.epub Failed to run pipe worker with command: from calibre.srv.render_book import viewer_main; viewer_main() Traceback (most recent call last): File "runpy.py", line 196, in _run_module_as_main File "runpy.py", line 86, in _run_code File "site.py", line 41, in File "site.py", line 37, in main File "calibre/utils/ipc/worker.py", line 196, in main File "", line 1, in File "calibre/srv/render_book.py", line 821, in viewer_main File "calibre/srv/render_book.py", line 812, in render_for_viewer File "calibre/srv/render_book.py", line 790, in render File "calibre/srv/render_book.py", line 603, in process_exploded_book File "calibre/srv/render_book.py", line 263, in create_cover_page File "calibre/srv/render_book.py", line 216, in find_epub_cover File "calibre/ebooks/oeb/polish/cover.py", line 284, in find_cover_image_in_page File "src/lxml/xpath.pxi", line 430, in lxml.etree.XPath.call File "src/lxml/apihelpers.pxi", line 41, in lxml.etree._documentOrRaise TypeError: Invalid input object: bytes

Which version of Calibre are you running?

6.14.0

Which version of the DeDRM plugin are you running?

v10.0.3

If applicable, which version of the Kindle software are you running?

No response

Log output

Paste log output here.
ElleKayEm commented 1 year ago

Do they have Adobe DRM? How are you downloading them?

mslmn commented 1 year ago

Yes. I am downloading them through Kobo Desktop from the JP Kobo ebook store. Other ebooks downloaded from the same store work just fine.

ElleKayEm commented 1 year ago

If you're downloading them through Kobo Desktop, then use the Obok plugin to import them and remove DRM. Those have Kobo's own DRM, not the Adobe DRM that the regular DeDRM plugin handles. The ones that "worked" must have been DRM-free.

mslmn commented 1 year ago

I have been using the Obok plugin to import and remove DRM on all my Kobo files, including the ones that aren't working.

ElleKayEm commented 1 year ago

Sorry I was confused by the fact that this log just shows the DeDRM plugin. Let's see a debug log of adding it with Obok. Although I think the problem is in the books themselves:

KeyError: "There is no item named 'OPS/advanced.opf' in the archive"

mslmn commented 1 year ago

It might be an issue with the books themselves. I've noticed the issue seems to be present on JP Jump comics specifically. #204