View Single Post
Old 02-07-2020, 08:10 PM   #1
ctop
Connoisseur
ctop herds cats with both ease and gracectop herds cats with both ease and gracectop herds cats with both ease and gracectop herds cats with both ease and gracectop herds cats with both ease and gracectop herds cats with both ease and gracectop herds cats with both ease and gracectop herds cats with both ease and gracectop herds cats with both ease and gracectop herds cats with both ease and gracectop herds cats with both ease and grace
 
Posts: 63
Karma: 43710
Join Date: Jun 2008
Device: zaurus->palm->iPad->Sony PRS-T1,T2,T3->KoboForma&Likebook Ares->Palma2
Calibre keeps crashing on me

Hi there,
I have a large Library of about 13500 ebooks, mostly EPUB. I repeatedly made the checks under Library maintenance and also updated the Metadata with the "Embed Metadata" action. Now I want to send the Library to my Device, but calibre keeps crashing on me. The transfer works OK, but at the end (I assume it is when the metadata.calibre file is generated) it crashes.
To nail down the problem I created a Folder device to speed things up (which did not really work faster), but the problem remains.
I installed the very latest Calibre (4.10.1) and started in Debug mode. With this version, I still observe the crash, but at least now the Debug log contains some useful information, here are the last lines:

Code:
DEBUG:   33.4 USBMS: Fetching list of books from device. Device= FOLDER_DEVICE oncard= None
DEBUG:   33.4 USBMS: dirs are: /home/chris/00scratch/test-device/ 
exception during JSON decode_from_file
Traceback (most recent call last):
  File "site-packages/calibre/ebooks/metadata/book/json_codec.py", line 179, in decode_from_file
  File "json/__init__.py", line 291, in load
  File "json/__init__.py", line 352, in loads
  File "json/decoder.py", line 364, in decode
  File "json/decoder.py", line 382, in raw_decode
ValueError: No JSON object could be decoded
DEBUG:   33.4 USBMS: scan from root False /home/chris/00scratch/test-device/
Job: 0 Get device information finished
No details available.
Job: 1 Set library information finished
No details available.
Traceback (most recent call last):
  File "site-packages/calibre/customize/ui.py", line 428, in get_file_type_metadata
  File "site-packages/calibre/customize/builtins.py", line 194, in get_metadata
  File "site-packages/calibre/ebooks/metadata/epub.py", line 238, in get_quick_metadata
  File "site-packages/calibre/ebooks/metadata/epub.py", line 217, in get_metadata
  File "site-packages/calibre/ebooks/metadata/epub.py", line 165, in get_zip_reader
  File "site-packages/calibre/ebooks/metadata/epub.py", line 148, in __init__
  File "site-packages/calibre/ebooks/metadata/epub.py", line 99, in __init__
  File "site-packages/calibre/ebooks/metadata/epub.py", line 152, in open
  File "site-packages/calibre/utils/localunzip.py", line 271, in open
TypeError: 'NoneType' object is not iterable
WARNING: Invalid mimetype declaration application/epub+zip
Traceback (most recent call last):
  File "site-packages/calibre/customize/ui.py", line 428, in get_file_type_metadata
  File "site-packages/calibre/customize/builtins.py", line 194, in get_metadata
  File "site-packages/calibre/ebooks/metadata/epub.py", line 238, in get_quick_metadata
  File "site-packages/calibre/ebooks/metadata/epub.py", line 217, in get_metadata
  File "site-packages/calibre/ebooks/metadata/epub.py", line 165, in get_zip_reader
  File "site-packages/calibre/ebooks/metadata/epub.py", line 148, in __init__
  File "site-packages/calibre/ebooks/metadata/epub.py", line 99, in __init__
  File "site-packages/calibre/ebooks/metadata/epub.py", line 152, in open
  File "site-packages/calibre/utils/localunzip.py", line 271, in open
TypeError: 'NoneType' object is not iterable
WARNING: Invalid mimetype declaration application/epub+zip
Traceback (most recent call last):
  File "site-packages/calibre/customize/ui.py", line 428, in get_file_type_metadata
  File "site-packages/calibre/customize/builtins.py", line 194, in get_metadata
  File "site-packages/calibre/ebooks/metadata/epub.py", line 238, in get_quick_metadata
  File "site-packages/calibre/ebooks/metadata/epub.py", line 217, in get_metadata
  File "site-packages/calibre/ebooks/metadata/epub.py", line 165, in get_zip_reader
  File "site-packages/calibre/ebooks/metadata/epub.py", line 148, in __init__
  File "site-packages/calibre/ebooks/metadata/epub.py", line 99, in __init__
  File "site-packages/calibre/ebooks/metadata/epub.py", line 152, in open
  File "site-packages/calibre/utils/localunzip.py", line 271, in open
TypeError: 'NoneType' object is not iterable
So I guess there is still a book somewhere which has invalid metadata. Could this have been produced with the process that send the files to the device? That process also crashed, but it was still 4.8.0 and no information was in the debug log.
So basically, I wonder if I am understand the problem correctly, and what to do about it. If there is a problem with a book, how can I find out which one? I added the first book to this Library in 2009, so there is definitely a certain amount of cruft, but I would hate to completely give up the Library.

All the best,

Ctop
ctop is offline   Reply With Quote