xls:attribute error in FB2 files

Bug #1243709 reported by Odinokij Volk
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
calibre
Fix Released
Undecided
Unassigned

Bug Description

In Fb2 files, in the last versions of calibre (it used to work without any problem) if there's a paragraph like:

<p style="text-align:center; text-indent:0em;" id="123">My paragraph</p>

in which there's a "style" and an "id" together, the calibre viewer shows and error when trying to open the book, and also the calibre program when trying to convert it to other formats.

The error message is:

"xls:attribute: Cannot add attributes to an element if children have been already added to the element"

and the details of the error are:

calibre, version 1.7.0
ERROR: No se pudo abrir el libro electrónico: xsl:attribute: Cannot add attributes to an element if children have been already added to the element.

Traceback (most recent call last):
  File "site-packages\calibre\gui2\viewer\main.py", line 40, in run
  File "threading.py", line 761, in run
  File "site-packages\calibre\ebooks\oeb\iterator\book.py", line 99, in __enter__
  File "site-packages\calibre\customize\conversion.py", line 241, in __call__
  File "site-packages\calibre\ebooks\conversion\plugins\fb2_input.py", line 89, in convert
  File "xslt.pxi", line 596, in lxml.etree.XSLT.__call__ (src\lxml\lxml.etree.c:140916)
XSLTApplyError: xsl:attribute: Cannot add attributes to an element if children have been already added to the element.

Thank you for your work, you're great.
   Odinokij.

Revision history for this message
Odinokij Volk (odinokijvolk) wrote :
Revision history for this message
Kovid Goyal (kovid) wrote : Fixed in master

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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.