polish fails when adding jacket to epub

Bug #1225357 reported by Bryan Durnell on 2013-09-14
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

Calibre version: 1.3.0 x64
OS: Windows 8 Professional 64-bit

I have edited the xhtml and css files for the metadata jacket to include a couple of my custom columns, but when trying to polish an ePub and adding a metadata jacket it fails when I try to use a column that is for keeping series-like information (basically a "sub-series").

Without this custom column being defined it will work properly, even with other custom columns defined.

I have noticed, however, that if that column is populated, then it will work with it being defined, but if it is empty is when it fails.

Here is the output I get:

Traceback (most recent call last):
  File "site.py", line 132, in main
  File "site.py", line 109, in run_entry_point
  File "site-packages\calibre\ebooks\oeb\polish\main.py", line 260, in main
  File "site-packages\calibre\ebooks\oeb\polish\main.py", line 150, in polish
  File "site-packages\calibre\ebooks\oeb\polish\jacket.py", line 86, in add_or_r
  File "site-packages\calibre\ebooks\oeb\polish\jacket.py", line 57, in replace_
  File "site-packages\calibre\ebooks\oeb\polish\jacket.py", line 22, in render_j
  File "site-packages\calibre\ebooks\oeb\transforms\jacket.py", line 259, in ren
  File "site-packages\calibre\ebooks\oeb\transforms\jacket.py", line 221, in gen
KeyError: u'_subseries'

Bryan Durnell (ealdwulf) on 2013-09-14
description: updated
description: updated

That error indicates the name you used does not exist. You need to
ensure you are using the correct name for the column, which you can get
by hovering the mouse over the column header.

 status invalid

Changed in calibre:
status: New → Invalid
Bryan Durnell (ealdwulf) wrote :

the name of the column that I am using is #subseries

the entry that I put into template.xhtml is _subseries

if the #subseries column is populated, then it works fine

if the #subseries column is NOT populated then it does not work

if you would like, I can provide the database file and template.xhtml so you can see that
a) the column does exist
b) that with nothing in that column it does not work

Changed in calibre:
status: Invalid → New
Kovid Goyal (kovid) wrote :

Attach the db file and the template

 status incomplete

Changed in calibre:
status: New → Incomplete
Bryan Durnell (ealdwulf) wrote :

Database attached

Bryan Durnell (ealdwulf) wrote :

Template attached

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

 status fixreleased

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

Other bug subscribers