Quote:
Originally Posted by Pocket of Books
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.