Cover replacement in edit fails

Bug #1260822 reported by Dr. Juergen Helmers on 2013-12-13
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

When I open an epub file with the new "Edit Book" feature, choose the cover image in "Images/image_file.jpg", right click and choose "Replace image_file.jpg with", choose a jpg file and click "OK", I do get the following error:

calibre, version 1.15.0
ERROR: Unhandled exception: <b>UnboundLocalError</b>:local variable 'mt' referenced before assignment

calibre 1.15 isfrozen: True is64bit: True
Linux-3.11.0-14-generic-x86_64-with-debian-wheezy-sid Linux ('64bit', 'ELF')
('Linux', '3.11.0-14-generic', '#21-Ubuntu SMP Tue Nov 12 17:04:55 UTC 2013')
Python 2.7.5
Linux: ('debian', 'wheezy/sid', '')
Traceback (most recent call last):
  File "site-packages/calibre/gui2/tweak_book/", line 69, in ans
  File "site-packages/calibre/gui2/tweak_book/", line 775, in replace_requested
  File "site-packages/calibre/ebooks/oeb/polish/", line 143, in replace_file
UnboundLocalError: local variable 'mt' referenced before assignment

File > Save is greyed out but I can save a copy which then has the new cover image incorporated.

Would be better for novice users to not get the error message and be able to just save, replace the epub file and update the thumbnail in the main view.

Not a show stopper for me ;-)

Thanks for the great work on calibre! Love the program!!!

Cheers Juergen

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

 status fixreleased

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

Other bug subscribers