BasioMeusPuga / Lector

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

Scanning folder for epubs fails with exceptions. #41

Closed bugzy closed 6 years ago

bugzy commented 6 years ago

Summary: Opening Lector and scanning a directory of ebooks results in scanning pool.py and parser.py failure.

==Steps to reproduce:==

  1. Open Lector.
  2. Click on cog wheel icon (settings).
  3. Select path to scan in the "Library" window.
  4. Click "Scan Library"

==Expected Results:== Books appear in the Library view of Lector

==Actual Results:== Progress bar displays progress through 100% but nothing appears in library view (even after restart).

==Additional Info:== The output on the command prompt, which seems to pin-point where the failure occurs is as follows:

Locale: en_US (No translations found) Icon theme "ubuntu-mono-dark" not found. Icon theme "gnome" not found. Database returned no paths for settings... Available parsers: .pdf .epub .mobi .azw .azw3 .azw4 .prc .cbz .cbr Database returned nothing 281 books found libpng warning: iCCP: known incorrect sRGB profile None not found in NightCircus_epub.v2.epub QImage::scaled: Image is a null image libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: known incorrect sRGB profile QImage::scaled: Image is a null image libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: known incorrect sRGB profile None not found in William Strunk, Jr. The Elements of Style (Updated 2011 Edition) 2011.epub.zip libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: known incorrect sRGB profile Exception in thread Thread-10: multiprocessing.pool.RemoteTraceback: """ Traceback (most recent call last): File "/usr/lib64/python3.6/multiprocessing/pool.py", line 119, in worker result = (True, func(args, *kwds)) File "/usr/lib64/python3.6/multiprocessing/pool.py", line 44, in mapstar return list(map(args)) File "/usr/lib/python3.6/site-packages/lector/sorter.py", line 202, in read_book cover_image_raw = book_ref.get_cover_image() File "/usr/lib/python3.6/site-packages/lector/parsers/pdf.py", line 74, in get_cover_image cover_image = cover_page.renderToImage(300, 300) AttributeError: 'NoneType' object has no attribute 'renderToImage' """

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

Traceback (most recent call last): File "/usr/lib64/python3.6/threading.py", line 916, in _bootstrap_inner self.run() File "/usr/lib64/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 270, in pool_creator self.read_book, self.file_list) File "/usr/lib64/python3.6/multiprocessing/pool.py", line 266, in map return self._map_async(func, iterable, mapstar, chunksize).get() File "/usr/lib64/python3.6/multiprocessing/pool.py", line 644, in get raise self._value AttributeError: 'NoneType' object has no attribute 'renderToImage'

Finished processing in 14.044128894805908

BasioMeusPuga commented 6 years ago

That's an error with the pdf parser. Could you pinpoint what pdf files were in this folder?