BasioMeusPuga / Lector

Qt based ebook reader
GNU General Public License v3.0
1.51k stars 207 forks source link

Can't open book #27

Closed DukeValentine closed 6 years ago

DukeValentine commented 6 years ago

There's a book that I've added to my library that lector is not able to open. It gives this error:

Traceback (most recent call last):
  File "/usr/lib/python3.6/multiprocessing/pool.py", line 119, in worker
    result = (True, func(*args, **kwds))
  File "/usr/lib/python3.6/multiprocessing/pool.py", line 44, in mapstar
    return list(map(*args))
  File "/usr/lib/python3.6/site-packages/lector/sorter.py", line 210, in read_book
    all_content = book_ref.get_contents()
  File "/usr/lib/python3.6/site-packages/parsers/epub.py", line 63, in get_contents
    self.book_ref.parse_chapters(temp_dir=self.extract_path)
  File "/usr/lib/python3.6/site-packages/ePub/read_epub.py", line 246, in parse_chapters
    chapter_data, self.book['split_chapters'][i])
  File "/usr/lib/python3.6/site-packages/ePub/read_epub.py", line 317, in get_split_content
    xml_string = this_split[1]
IndexError: list index out of range
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib/python3.6/site-packages/lector/sorter.py", line 268, in pool_creator
    self.read_book, self.file_list)
  File "/usr/lib/python3.6/multiprocessing/pool.py", line 266, in map
    return self._map_async(func, iterable, mapstar, chunksize).get()
  File "/usr/lib/python3.6/multiprocessing/pool.py", line 644, in get
    raise self._value
IndexError: list index out of range
BasioMeusPuga commented 6 years ago

Could you link me to the book? I know what the error is, I'd like to see why it happened.

DukeValentine commented 6 years ago

Here, I had to zip the file because github apparently doesn't support epub for attachments.

Fate Zero - Volume 01 - The Untold Story of the Fourth Holy Grail War [Alternative Layout].zip

I thought it would be a problem with the file itself, but it opened normally in other epub readers.

BasioMeusPuga commented 6 years ago

Are you sure this is the right book? It opened without issues. I also looked at the files in the epub. They don't even trigger the code path you're getting this error with.

https://imgur.com/a/L5MmI

DukeValentine commented 6 years ago

You're right,, this is the correct one. Fate Zero - Volume 01 - The Untold Story of the Fourth Holy Grail War.zip

BasioMeusPuga commented 6 years ago

I think I was able to track this down. This particular book works now, at any rate.