Comment 2 for bug 1862440

Revision history for this message
Sheridan Smith (brionismith) wrote :

I trust that you understand the problem to exist in the metadata editor when dropping a new cover onto the cover being displayed. The only way I can now get the new cover in is to use the browse for cover function.

I’ve done some further testing after your email, and found the problem to be image related, one such image attached hereto.

Although the metadata editor displays no error message, the error being displayed when dropping the image onto the book details viewer (the viewer that comes up when double clicking on the cover display in the book details) is as follows:

========================================================
calibre, version 4.10.1
ERROR: Unhandled exception: <b>ValueError</b>:Failed to export image as JPEG with error: Image is empty

calibre 4.10.1 [64bit] embedded-python: True is64bit: True
Windows-10-10.0.17763-SP0 Windows ('64bit', 'WindowsPE')
('Windows', '10', '10.0.17763')
Python 2.7.16+
Windows: ('10', '10.0.17763', 'SP0', u'Multiprocessor Free')
Interface language: None
Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (1, 28, 0) && DeDRM (6, 6, 3) && K4PC, K4Mac, Kindle Mobi and Topaz DeDRM (0, 3, 5) && Package KFX (from KFX Input) (1, 28, 0) && Wiki Reader (2, 1, 1) && Find Duplicates (1, 6, 3) && food network Recipe Reader (1, 0, 2) && Consolidate All Library Metadata (2, 0, 34) && all recipes Recipe Reader (1, 0, 2) && Count Pages (1, 9, 0) && Generate Cover (1, 5, 22) && Hymn Reader (1, 0, 1) && KFX metadata reader (from KFX Input) (1, 28, 0) && KFX Input (1, 28, 0) && Recipe Reader (1, 0, 1) && BBC GoodFood Recipe Reader (1, 1, 0) && English Noun Frequency (1, 0, 11)
Traceback (most recent call last):
  File "site-packages\calibre\gui2\dialogs\book_info.py", line 224, in cover_changed
  File "site-packages\calibre\db\legacy.py", line 714, in set_cover
  File "site-packages\calibre\db\cache.py", line 62, in call_func_with_lock
  File "site-packages\calibre\db\cache.py", line 1253, in set_cover
  File "site-packages\calibre\db\backend.py", line 1456, in set_cover
  File "site-packages\calibre\utils\img.py", line 251, in save_cover_data_to
  File "site-packages\calibre\utils\img.py", line 163, in image_to_data
ValueError: Failed to export image as JPEG with error: Image is empty
================================================================================

Although it report image as empty, it does display correctly in photo viewer, explorer and elsewhere I could establish, and it imports correctly when using the browse for cover feature in the metadata editor and dropping the image onto the cover in the main library display.