Cover disappear when dragging new cover into editor and dropping it on the cover space

Bug #1862440 reported by Sheridan Smith on 2020-02-08
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

Calibre 4.10.1 64-bit Windows

Windows 10 - 18.09 release

When you open a book in the editor, and drag a new cover into the editor and drop it on the editor view, the cover disappear completely, even the previous cover if there were any, disappear.

Dragging the new cover into the cover view of the book details works correct.

Also the browse for cover in the editor works correctly.

I cannot replicate this, steps I tried:

1) Open a book with an existing cover image in the editor
2) Double click the image file to open it in the editor
3) drag and drop another image onto the displayed image from the file
4) The image is successfully replaced
5) Click save, and open book in viewer. new cover is displayed as

 status invalid

Changed in calibre:
status: New → Invalid
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\", line 224, in cover_changed
  File "site-packages\calibre\db\", line 714, in set_cover
  File "site-packages\calibre\db\", line 62, in call_func_with_lock
  File "site-packages\calibre\db\", line 1253, in set_cover
  File "site-packages\calibre\db\", line 1456, in set_cover
  File "site-packages\calibre\utils\", line 251, in save_cover_data_to
  File "site-packages\calibre\utils\", 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.

Fixed in branch master. The fix will be in the next release. calibre is usually released every alternate Friday.

 status fixreleased

Changed in calibre:
status: Invalid → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers