View Single Post
Old 06-06-2010, 08:55 PM   #1
q345 began at the beginning.
Posts: 23
Karma: 10
Join Date: May 2010
Device: none
Question Can't update cover if file cover.jpg is already in the directory ?

If I already have a cover.jpg file in the directory and I go to metadata editor, download a cover and hit 'OK' I got

File "/home/kovid/build/calibre/src/calibre/utils/", line 221, in save_cover_data_to
IOError: [Errno 2] No such file or directory: u'..../cover.jpg'

I need to go to the directory, manually remove cover.jpg file, only then, when I hit OK, new cover file is saved.

I have the latest Calibre 7.1 installed under Ubuntu
The line 221 in magic_draw just tries the open cover.jpg file for writing in 'wb' mode

221 with open(path, 'wb') as f:

My question is if 'wb' (write in binary mode) necessary when opening file in Linux (not in Window) and if this might cause the problem ?
q345 is offline   Reply With Quote