View Single Post
Old 11-22-2009, 02:48 PM   #1
luqmaninbmore
Da'i
luqmaninbmore ought to be getting tired of karma fortunes by now.luqmaninbmore ought to be getting tired of karma fortunes by now.luqmaninbmore ought to be getting tired of karma fortunes by now.luqmaninbmore ought to be getting tired of karma fortunes by now.luqmaninbmore ought to be getting tired of karma fortunes by now.luqmaninbmore ought to be getting tired of karma fortunes by now.luqmaninbmore ought to be getting tired of karma fortunes by now.luqmaninbmore ought to be getting tired of karma fortunes by now.luqmaninbmore ought to be getting tired of karma fortunes by now.luqmaninbmore ought to be getting tired of karma fortunes by now.luqmaninbmore ought to be getting tired of karma fortunes by now.
 
luqmaninbmore's Avatar
 
Posts: 1,144
Karma: 1217499
Join Date: Oct 2008
Location: Baltimore
Device: Toshiba Thrive, Kobo Touch, Kindle 1, Aluratek Libre, T-Mobile Comet
Failed to Conver HTML to FB2 in 0.6.24 Linux

Greetings,

I have been attempting to make a nice FB2 out of an ereader html file and I upgraded to the most recent calibre so that I could get cover support. Unfortunately, the conversion to FB2 is failing now (it succeeded under earlier versions of calibre). I converted and EPUB to FB2 succesfully, so FB2 conversion is not entirely broken.

Here are the details:

ERROR: Conversion Error: <b>Failed</b>: Convert book 1 of 1 (Dracula: The Undead)

Convert book 1 of 1 (Dracula: The Undead)
Processing archive...
Resolved conversion options
{'asciiize': False,
'author_sort': None,
'authors': None,
'base_font_size': 0.0,
'book_producer': None,
'breadth_first': False,
'chapter': u"//*[((name()='h1' or name()='h2') and re:test(., 'chapter|book|section|part\\s+', 'i')) or @class = 'chapter']",
'chapter_mark': u'pagebreak',
'comments': None,
'cover': '/tmp/calibre_0.6.24_bHXsaj.jpeg',
'debug_pipeline': None,
'disable_font_rescaling': False,
'dont_justify': False,
'dont_package': False,
'extra_css': None,
'font_size_mapping': None,
'footer_regex': u'(?i)(?<=<hr>)((\\s*<a name=\\d+></a>((<img.+?>)*<br>\\s*)?\\d+<br>\\s*.*?\\s*)|(\\s* <a name=\\d+></a>((<img.+?>)*<br>\\s*)?.*?<br>\\s*\\d+))(?=<br>)' ,
'header_regex': u'(?i)(?<=<hr>)((\\s*<a name=\\d+></a>((<img.+?>)*<br>\\s*)?\\d+<br>\\s*.*?\\s*)|(\\s* <a name=\\d+></a>((<img.+?>)*<br>\\s*)?.*?<br>\\s*\\d+))(?=<br>)' ,
'inline_toc': False,
'input_encoding': u'cp1252',
'input_profile': <calibre.customize.profiles.InputProfile object at 0xa371f4c>,
'insert_blank_line': False,
'insert_metadata': False,
'isbn': None,
'language': None,
'level1_toc': None,
'level2_toc': None,
'level3_toc': None,
'line_height': 0.0,
'linearize_tables': False,
'margin_bottom': 5.0,
'margin_left': 5.0,
'margin_right': 5.0,
'margin_top': 5.0,
'max_levels': 5,
'max_toc_links': 50,
'no_chapters_in_toc': False,
'no_inline_navbars': False,
'output_profile': <calibre.customize.profiles.CybookOpusOutput object at 0xa3775ac>,
'page_breaks_before': u"//*[name()='h1' or name()='h2']",
'prefer_metadata_cover': False,
'preprocess_html': False,
'pretty_print': False,
'publisher': None,
'rating': None,
'read_metadata_from_opf': '/tmp/calibre_0.6.24_6Em9w_.opf',
'remove_first_image': False,
'remove_footer': False,
'remove_header': False,
'remove_paragraph_spacing': False,
'series': None,
'series_index': None,
'tags': None,
'title': None,
'title_sort': None,
'toc_filter': None,
'toc_threshold': 6,
'unwrap_factor': 0.0,
'use_auto_toc': False,
'verbose': 2}
InputFormatPlugin: HTML Input running on /tmp/calibre_0.6.24_Ntmmpr_plumber/book.html
Language not specified
Building file list...
Found files...
HTMLFile:0:a:/tmp/calibre_0.6.24_Ntmmpr_plumber/book.html
Parsing book.html ...
Parsing file 'book.html' as HTML
File 'book.html' missing <head/> element
Added /tmp/calibre_0.6.24_Ntmmpr_plumber/cover.png
Merging user specified metadata...
Detecting structure...
Maximum TOC links reached, stopping.
Auto generated TOC with 50 entries.
Flattening CSS and remapping font sizes...
Source base font size is 12.00000pt
Cleaning up manifest...
Trimming unused files from manifest...
Parsing stylesheet.css ...
Creating FB2 Output...
Converting XHTML to FB2 markup...
Converting book.html to FictionBook2 XML
Traceback (most recent call last):
File "/tmp/init.py", line 48, in <module>
File "/home/kovid/build/calibre/src/calibre/utils/ipc/worker.py", line 90, in main
File "/home/kovid/build/calibre/src/calibre/gui2/convert/gui_conversion.py", line 19, in gui_convert
File "/home/kovid/build/calibre/src/calibre/ebooks/conversion/plumber.py", line 835, in run
File "/home/kovid/build/calibre/src/calibre/ebooks/fb2/output.py", line 26, in convert
File "/home/kovid/build/calibre/src/calibre/ebooks/fb2/fb2ml.py", line 65, in extract_content
File "/home/kovid/build/calibre/src/calibre/ebooks/fb2/fb2ml.py", line 78, in fb2mlize_spine
File "lxml.etree.pyx", line 2538, in lxml.etree.fromstring (src/lxml/lxml.etree.c:48266)
File "parser.pxi", line 1536, in lxml.etree._parseMemoryDocument (src/lxml/lxml.etree.c:71653)
File "parser.pxi", line 1408, in lxml.etree._parseDoc (src/lxml/lxml.etree.c:70449)
File "parser.pxi", line 898, in lxml.etree._BaseParser._parseUnicodeDoc (src/lxml/lxml.etree.c:67144)
File "parser.pxi", line 539, in lxml.etree._ParserContext._handleParseResultDoc (src/lxml/lxml.etree.c:63820)
File "parser.pxi", line 625, in lxml.etree._handleParseResult (src/lxml/lxml.etree.c:64741)
File "parser.pxi", line 565, in lxml.etree._raiseParseError (src/lxml/lxml.etree.c:64084)
lxml.etree.XMLSyntaxError: Opening and ending tag mismatch: strong line 13 and p, line 13, column 167
luqmaninbmore is offline   Reply With Quote