babluboy / bookworm

A simple ebook reader for Elementary OS
GNU General Public License v3.0
1.32k stars 100 forks source link

Epubs are not loading properly #200

Closed thegayankalinga closed 6 years ago

thegayankalinga commented 6 years ago

https://github.com/bjut-hz/E-Books/tree/master/software%20engineering

I tried the above epub book 1st one clean architect and it only shows some of the pages

babluboy commented 6 years ago

Looks like the first ebook is not packaged properly. I tried opening it with an archive manager and it could not open the same. Then I tried opening it with Calibre and it also gave the same error:

calibre, version 2.55.0
ERROR: Could not open ebook: Failed to read book, /home/sid/Downloads/Clean Arch.epub click "Show Details" for more information
Traceback (most recent call last):
  File "/usr/lib/calibre/calibre/utils/ipc/simple_worker.py", line 274, in main
    res = {'result':func(*args, **kwargs)}
  File "/usr/lib/calibre/calibre/ebooks/oeb/iterator/book.py", line 62, in extract_book
    plumber.opts, plumber.input_fmt, log, {}, tdir)
  File "/usr/lib/calibre/calibre/customize/conversion.py", line 241, in __call__
    log, accelerators)
  File "/usr/lib/calibre/calibre/ebooks/conversion/plugins/epub_input.py", line 197, in convert
    extractall(stream)
  File "/usr/lib/calibre/calibre/utils/localunzip.py", line 223, in extractall
    _extractall(f, path)
  File "/usr/lib/calibre/calibre/utils/localunzip.py", line 210, in _extractall
    raise ValueError('Not a ZIP file')
ValueError: Not a ZIP file

I tried opening the next book (.mobi) and both Bookworm and Calibre failed to open it with the issue being an invalid packaging. Might be worth raising an issue on that GitHub to see why the books are giving un-pack errors.