View Single Post
Old 04-14-2023, 05:52 AM   #1085
kiwidude
Calibre Plugins Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,732
Karma: 2197770
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
Quote:
Originally Posted by feuille View Post
Hello kiwidude,

when Calibre was running in debug mode today, I noticed that an key error is reported in the book_algorithms.py module:

File "calibre_plugins.find_duplicates.book_algorith ms", line 295, in _find_candidate_by_file_size
KeyError: 'mtime'

Statement 295 in version (1, 10, 7) is: mtime = stat_metadata['mtime'].

However, the plugin continued to run and returned a result.

Regards,
Hi fueille,

The only way I can see this happening is if you somehow have invalid metadata in your library for a book format. Perhaps you deleted a book format from disk, but calibre still thinks it exists.

I will tweak the code so the exception won't appear in future, but with the way it is written it would just skip that book format anyways which is what it should do, it is just extra noise in the log.
kiwidude is offline   Reply With Quote