View Single Post
Old 10-09-2014, 08:18 PM   #501
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,980
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Quote:
Originally Posted by Pocket of Books View Post
I'm getting the following message upon using "Generate Cover":ERROR: Unhandled exception: <b>KeyError</b>:u'generate_cover_title_font'.
I've had a FFDL user report this same issue (FFDL can call GC), so I was investigating it. And it looks like it is a real problem with fresh calibre installs caused by the fact that calibre's tweaks no longer have a generate_cover_title_font value.

I see the same issue with GC running in a fresh portable install.

The relevant code in GC is:

Code:
...
from calibre.utils.config import tweaks
...
def get_font_or_default(font_name):
    default_font = tweaks['generate_cover_title_font']
...
The attached test version changes that to:

Code:
...
from calibre.utils.config import tweaks
...
def get_font_or_default(font_name):
    default_font = tweaks.get('generate_cover_title_font',None)
...
...so it works for both fresh installs and existing that have generate_cover_title_font set to something. (Also changes the only other 'tweaks' value in the PI similarly.)

If I can a confirmation or two of the problem and that this fixes it, I'll ask Kovid to update the release version.

Last edited by JimmXinu; 04-03-2015 at 04:46 PM. Reason: Remove obsolete test versions - replaced by newer test or released version.
JimmXinu is offline   Reply With Quote