BasioMeusPuga / Lector

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

Can't add books to library #26

Closed ConorIA closed 6 years ago

ConorIA commented 6 years ago

When trying to add a book to my library, I get the following error:

Database returned no paths for settings...
Available parsers: *.pdf *.epub *.mobi *.azw *.azw3 *.azw4 *.prc *.cbz *.cbr
Database returned nothing
Finished processing in 0.17900586128234863
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/lector/models.py", line 91, in headerData
    return self.header_data[column]
IndexError: list index out of range
zsh: abort (core dumped)  lector

This seems to happen most of the time. There have been a couple of times that I managed to actually add books, but they didn't appear even though the library didn't throw an error. Happy to try and debug it.

BasioMeusPuga commented 6 years ago

I'm not sure you're at the latest commit. I have that at line number 101 for me. Could you please try a fresh clone / install?

If that doesn't work, we'll do this over.

ConorIA commented 6 years ago

You're right, I was behind, but I am getting the same error. I'll try on my office computer tomorrow to see if it is specific to my laptop.

ConorIA commented 6 years ago

I restarted my computer, and did the following:

~ >>> rm -rfv ~/.config/Lector*                                                                                                                              
removed '/home/user/.config/Lector/Lector.conf'
removed directory '/home/user/.config/Lector'
removed '/home/user/.config/Lectorrc'
~ >>> rm -rfv ~/.local/share/Lector                                                                                                                          
removed '/home/user/.local/share/Lector/Lector.db'
removed '/home/user/.local/share/Lector/Lector.db-journal'
removed directory '/home/user/.local/share/Lector'
~ >>> lector                                                                                                                                              [1]
Locale: en_CA (No translations found)
Icon theme "ubuntu-mono-dark" not found.
Database returned no paths for settings...
Available parsers: *.pdf *.epub *.mobi *.azw *.azw3 *.azw4 *.prc *.cbz *.cbr
Database returned nothing
62 books found
libpng warning: iCCP: known incorrect sRGB profile
Finished processing in 53.90979528427124
62 books found
Finished processing in 0.1460731029510498

The above error is gone, but I still can't see any books.

screenshot_20180320_091933

EDIT: I can manually add books, unless they are already in my library. If I add the folder containing the manually added books to my library, they also disappear from the interface.

screenshot_20180320_092257

BasioMeusPuga commented 6 years ago

I have to wonder if it's the data in one of the images/books that's not letting the model build properly.

  1. Can you see books in the Table View?
  2. If it's not too much trouble / the books aren't too big, can you upload the 62 of them somewhere? If you'd like to preserve your privacy, just email them to me: disgruntled.mob@gmail.com
ConorIA commented 6 years ago
  1. Nope. Not visible at all.
  2. Sure. I will email you a link to a shared folder.

I moved some of the "possible offenders" (some scanned pamphlets) out of the folder, but that didn't change anything.

I also renamed the "Books and Magzines" folder I was using to "Books", when I re-scanned my library, even the manually added books disappeared! :confused:

BasioMeusPuga commented 6 years ago

I was splitting the wrong variable. Sigh.

It should be working now. Check and see?

ConorIA commented 6 years ago

I'm on a different machine right now, but it is working with the latest commit. Thanks for tracking that down.