View Single Post
Old 09-26-2010, 06:13 AM   #80
Perkin
Guru
Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.
 
Perkin's Avatar
 
Posts: 657
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
Thanks chaley.

look forward to new beta.

I've noticed another problem, converting a pdf with some settings throws an error, but with others full converts the same pdf

Whereas, the 'normal' calibre, converted the file with either settings.

This is the log of settings throwing the error
Spoiler:
ERROR: Conversion Error: <b>Failed</b>: Convert book 1 of 1 (Falls the Shadow)

Convert book 1 of 1 (Falls the Shadow)
Resolved conversion options
calibre version: 0.7.903
{'asciiize': False,
'author_sort': None,
'authors': None,
'base_font_size': 11.0,
'book_producer': None,
'change_justification': u'original',
'chapter': u"//*[((name()='h1' or name()='h2') and re:test(., 'chapter|book|prologue|epilogue|glossary|section|p art\\s+', 'i') or re:test(.,'^\\d+$',i)) or @class = 'chapter']",
'chapter_mark': u'none',
'comments': None,
'cover': 'c:\\users\\leigh\\appdata\\local\\temp\\calibre_0 .7.903_tmp_g3k3tz\\calibre_0.7.903_v26evu.jpeg',
'debug_pipeline': None,
'disable_font_rescaling': False,
'dont_split_on_page_breaks': False,
'extra_css': u'body {text-align: justify; text-indent: 0.8em;}',
'extract_to': None,
'flow_size': 2260,
'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>)' ,
'html_unwrap_factor': 0.40000000000000002,
'input_encoding': None,
'input_profile': <calibre.customize.profiles.InputProfile object at 0x046D6E50>,
'insert_blank_line': False,
'insert_metadata': False,
'isbn': None,
'keep_ligatures': False,
'language': None,
'level1_toc': None,
'level2_toc': None,
'level3_toc': None,
'line_height': 12.0,
'linearize_tables': False,
'margin_bottom': 5.0,
'margin_left': 5.0,
'margin_right': 5.0,
'margin_top': 5.0,
'max_toc_links': 50,
'new_pdf_engine': False,
'no_chapters_in_toc': False,
'no_default_epub_cover': True,
'no_images': True,
'no_inline_navbars': False,
'no_svg_cover': True,
'output_profile': <calibre.customize.profiles.SonyReader300Output object at 0x046E0210>,
'page_breaks_before': u'/',
'prefer_metadata_cover': False,
'preprocess_html': False,
'preserve_cover_aspect_ratio': False,
'pretty_print': True,
'pubdate': None,
'publisher': None,
'rating': None,
'read_metadata_from_opf': 'c:\\users\\leigh\\appdata\\local\\temp\\calibre_0 .7.903_tmp_g3k3tz\\calibre_0.7.903_6jvhrn.opf',
'remove_first_image': False,
'remove_footer': False,
'remove_header': False,
'remove_paragraph_spacing': False,
'remove_paragraph_spacing_indent_size': 0.80000000000000004,
'series': None,
'series_index': None,
'smarten_punctuation': False,
'tags': None,
'timestamp': None,
'title': None,
'title_sort': None,
'toc_filter': None,
'toc_threshold': 6,
'unwrap_factor': 0.0,
'use_auto_toc': False,
'verbose': 2}
InputFormatPlugin: PDF Input running
on D:\Calibre_BETA\Doctor Who\Daniel O'Mahony\Falls the Shadow (150)\Falls the Shadow - Daniel O'Mahony.pdf
Converting file to html...
pdftohtml log:

Retrieving document metadata...
Generating manifest...
Rendering manifest...
Parsing all content...
Parsing index.html ...
Failed to parse content in index.html
Traceback (most recent call last):
File "site-packages\calibre\ebooks\oeb\reader.py", line 158, in _manifest_prune_invalid
File "site-packages\calibre\ebooks\oeb\base.py", line 1060, in fget
File "site-packages\calibre\ebooks\oeb\base.py", line 789, in _parse_xhtml
File "site-packages\calibre\ebooks\conversion\preprocess.py", line 431, in __call__
UnboundLocalError: local variable 'length' referenced before assignment

Spine item 'id1' not found
Python function terminated unexpectedly
Spine is empty (Error Code: 1)
Traceback (most recent call last):
File "site.py", line 103, in main
File "site.py", line 85, in run_entry_point
File "site-packages\calibre\utils\ipc\worker.py", line 103, in main
File "site-packages\calibre\gui2\convert\gui_conversion.py", line 24, in gui_convert
File "site-packages\calibre\ebooks\conversion\plumber.py", line 841, in run
File "site-packages\calibre\ebooks\conversion\plumber.py", line 968, in create_oebbook
File "site-packages\calibre\ebooks\oeb\reader.py", line 72, in __call__
File "site-packages\calibre\ebooks\oeb\reader.py", line 593, in _all_from_opf
File "site-packages\calibre\ebooks\oeb\reader.py", line 288, in _spine_from_opf
calibre.ebooks.oeb.base.OEBError: Spine is empty


Where the same pdf with different settings, converts it fine.
Spoiler:
Convert book 1 of 1 (Falls the Shadow)
Resolved conversion options
calibre version: 0.7.903
{'asciiize': False,
'author_sort': None,
'authors': None,
'base_font_size': 11.0,
'book_producer': None,
'change_justification': u'justify',
'chapter': u"//*[((name()='h1' or name()='h2') and re:test(., 'chapter|book|prologue|epilogue|glossary|section|p art\\s+', 'i') or re:test(.,'^\\d+$',i)) or @class = 'chapter']",
'chapter_mark': u'none',
'comments': None,
'cover': 'c:\\users\\leigh\\appdata\\local\\temp\\calibre_0 .7.903_tmp_g3k3tz\\calibre_0.7.903_zvcgub.jpeg',
'debug_pipeline': None,
'disable_font_rescaling': False,
'dont_split_on_page_breaks': False,
'extra_css': u'body {text-align: justify; text-indent: 0.8em;}',
'extract_to': None,
'flow_size': 2260,
'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>)' ,
'html_unwrap_factor': 0.40000000000000002,
'input_encoding': None,
'input_profile': <calibre.customize.profiles.InputProfile object at 0x046F6E50>,
'insert_blank_line': True,
'insert_metadata': False,
'isbn': None,
'keep_ligatures': False,
'language': None,
'level1_toc': None,
'level2_toc': None,
'level3_toc': None,
'line_height': 12.0,
'linearize_tables': False,
'margin_bottom': 5.0,
'margin_left': 5.0,
'margin_right': 5.0,
'margin_top': 5.0,
'max_toc_links': 50,
'new_pdf_engine': False,
'no_chapters_in_toc': False,
'no_default_epub_cover': True,
'no_images': True,
'no_inline_navbars': False,
'no_svg_cover': True,
'output_profile': <calibre.customize.profiles.SonyReader300Output object at 0x04700210>,
'page_breaks_before': u'/',
'prefer_metadata_cover': False,
'preprocess_html': True,
'preserve_cover_aspect_ratio': False,
'pretty_print': True,
'pubdate': None,
'publisher': None,
'rating': None,
'read_metadata_from_opf': 'c:\\users\\leigh\\appdata\\local\\temp\\calibre_0 .7.903_tmp_g3k3tz\\calibre_0.7.903_ctnr4z.opf',
'remove_first_image': False,
'remove_footer': False,
'remove_header': False,
'remove_paragraph_spacing': True,
'remove_paragraph_spacing_indent_size': 0.80000000000000004,
'series': None,
'series_index': None,
'smarten_punctuation': True,
'tags': None,
'timestamp': None,
'title': None,
'title_sort': None,
'toc_filter': None,
'toc_threshold': 6,
'unwrap_factor': 0.40000000000000002,
'use_auto_toc': False,
'verbose': 2}
InputFormatPlugin: PDF Input running
on D:\Calibre_BETA\Doctor Who\Daniel O'Mahony\Falls the Shadow (150)\Falls the Shadow - Daniel O'Mahony.pdf
Converting file to html...
pdftohtml log:

Retrieving document metadata...
Generating manifest...
Rendering manifest...
Parsing all content...
Parsing index.html ...
Initial parse failed:
Traceback (most recent call last):
File "site-packages\calibre\ebooks\oeb\base.py", line 816, in first_pass
File "lxml.etree.pyx", line 2532, in lxml.etree.fromstring (src/lxml/lxml.etree.c:48270)
File "parser.pxi", line 1545, in lxml.etree._parseMemoryDocument (src/lxml/lxml.etree.c:71812)
File "parser.pxi", line 1417, in lxml.etree._parseDoc (src/lxml/lxml.etree.c:70608)
File "parser.pxi", line 898, in lxml.etree._BaseParser._parseUnicodeDoc (src/lxml/lxml.etree.c:67148)
File "parser.pxi", line 539, in lxml.etree._ParserContext._handleParseResultDoc (src/lxml/lxml.etree.c:63824)
File "parser.pxi", line 625, in lxml.etree._handleParseResult (src/lxml/lxml.etree.c:64745)
File "parser.pxi", line 565, in lxml.etree._raiseParseError (src/lxml/lxml.etree.c:64088)
XMLSyntaxError: Opening and ending tag mismatch: META line 9 and head, line 10, column 8

Parsing file 'index.html' as HTML
Forcing index.html into XHTML namespace
Generating default TOC from spine...
Merging user specified metadata...
Detecting structure...
Detected chapter: Prologue
Auto generated TOC with 20 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 EPUB Output...
Looking for large trees in index.html...
No large trees found
EPUB output written to c:\users\leigh\appdata\local\temp\calibre_0.7.903_ tmp_g3k3tz\calibre_0.7.903_wkm9t8.epub
Perkin is offline   Reply With Quote