View Single Post
Old 10-06-2011, 11:56 AM   #1
mistersquid
Junior Member
mistersquid began at the beginning.
 
mistersquid's Avatar
 
Posts: 7
Karma: 10
Join Date: Apr 2010
Device: iPhone + iPad
Error converting MOBI to other formats, Chobsky's _Perks of Being a Wallflower_

I'm having trouble converting (for my own use) an Amazon ebook (purchased by me). The error I receive reads


Spoiler:
Code:
calibre, version 0.8.18
ERROR: Conversion Error: <b>Failed</b>: Convert book 1 of 1 (The Perks of Being a Wallflower)

Convert book 1 of 1 (The Perks of Being a Wallflower)
Resolved conversion options
calibre version: 0.8.18
{'asciiize': False,
 'author_sort': None,
 'authors': None,
 'base_font_size': 10.0,
 'book_producer': None,
 'change_justification': u'left',
 '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': '/var/folders/f5/f5XKWYc9FxmbllXjHMg8z++++TI/-Tmp-/calibre_0.8.18_tmp_0HczVJ/aWvIsv.jpeg',
 'debug_pipeline': None,
 'dehyphenate': True,
 'delete_blank_paragraphs': True,
 'disable_font_rescaling': False,
 'duplicate_links_in_toc': False,
 'enable_heuristics': False,
 'extra_css': u'body{font-family:Times New Roman,Times, serif;margin:35pt}\npage { margin-bottom: 35.000000pt; margin-top: 35.000000pt; }',
 'fix_indents': True,
 'font_size_mapping': None,
 'format_scene_breaks': True,
 'html_unwrap_factor': 0.4,
 'input_encoding': None,
 'input_profile': <calibre.customize.profiles.InputProfile object at 0x10a9c7ed0>,
 'insert_blank_line': False,
 'insert_blank_line_size': 0.5,
 'insert_metadata': False,
 'isbn': None,
 'italicize_common_cases': True,
 'keep_ligatures': False,
 'language': None,
 'level1_toc': None,
 'level2_toc': None,
 'level3_toc': None,
 'line_height': 0.0,
 'linearize_tables': False,
 'margin_bottom': 35.0,
 'margin_left': 35.0,
 'margin_right': 35.0,
 'margin_top': 35.0,
 'markup_chapter_headings': True,
 'max_toc_links': 50,
 'minimum_line_height': 120.0,
 'no_chapters_in_toc': False,
 'no_inline_navbars': False,
 'output_profile': <calibre.customize.profiles.iPadOutput object at 0x10a9c8450>,
 'page_breaks_before': u"//*[name()='h1' or name()='h2']",
 'prefer_metadata_cover': False,
 'pretty_print': False,
 'pubdate': None,
 'publisher': None,
 'rating': None,
 'read_metadata_from_opf': '/var/folders/f5/f5XKWYc9FxmbllXjHMg8z++++TI/-Tmp-/calibre_0.8.18_tmp_0HczVJ/dO3Rko.opf',
 'remove_fake_margins': True,
 'remove_first_image': False,
 'remove_paragraph_spacing': False,
 'remove_paragraph_spacing_indent_size': 1.5,
 'renumber_headings': True,
 'replace_scene_breaks': u'',
 'series': None,
 'series_index': None,
 'smarten_punctuation': False,
 'sr1_replace': None,
 'sr1_search': None,
 'sr2_replace': None,
 'sr2_search': None,
 'sr3_replace': None,
 'sr3_search': None,
 'tags': None,
 'timestamp': None,
 'title': None,
 'title_sort': None,
 'toc_filter': None,
 'toc_threshold': 6,
 'unsmarten_punctuation': False,
 'unwrap_lines': True,
 'use_auto_toc': False,
 'verbose': 2}
Python function terminated unexpectedly: All strings must be XML compatible: Unicode or ASCII, no NULL bytes
InputFormatPlugin: MOBI Input running
on /var/folders/f5/f5XKWYc9FxmbllXjHMg8z++++TI/-Tmp-/calibre_0.8.18_tmp_0HczVJ/oly0qs.mobi
Extracting text...
Adding anchors...
Extracting images...
Cleaning up HTML...
Parsing HTML...
Malformed markup, parsing using BeautifulSoup
MOBI markup appears to contain random bytes. Stripping.
Extracting text...
Adding anchors...
Extracting images...
Cleaning up HTML...
Parsing HTML...
Malformed markup, parsing using BeautifulSoup
MOBI markup appears to contain random bytes. Stripping.
Traceback (most recent call last):
  File "/Applications/calibre.app/Contents/Resources/Python/lib/python2.7/site.py", line 147, in main
    return run_entry_point()
  File "/Applications/calibre.app/Contents/Resources/Python/lib/python2.7/site.py", line 116, in run_entry_point
    return getattr(pmod, func)()
  File "site-packages/calibre/utils/ipc/worker.py", line 187, in main
  File "site-packages/calibre/gui2/convert/gui_conversion.py", line 31, in gui_convert_override
  File "site-packages/calibre/gui2/convert/gui_conversion.py", line 25, in gui_convert
  File "site-packages/calibre/ebooks/conversion/plumber.py", line 944, in run
  File "site-packages/calibre/customize/conversion.py", line 204, in __call__
  File "site-packages/calibre/ebooks/mobi/input.py", line 27, in convert
  File "site-packages/calibre/ebooks/mobi/reader.py", line 349, in extract_content
  File "site-packages/lxml/html/soupparser.py", line 23, in fromstring
  File "site-packages/lxml/html/soupparser.py", line 67, in _parse
  File "site-packages/lxml/html/soupparser.py", line 77, in _convert_tree
  File "site-packages/lxml/html/soupparser.py", line 87, in _convert_children
  File "site-packages/lxml/html/soupparser.py", line 87, in _convert_children
  File "site-packages/lxml/html/soupparser.py", line 87, in _convert_children
  File "site-packages/lxml/html/soupparser.py", line 87, in _convert_children
  File "site-packages/lxml/html/soupparser.py", line 87, in _convert_children
  File "site-packages/lxml/html/soupparser.py", line 87, in _convert_children
  File "site-packages/lxml/html/soupparser.py", line 87, in _convert_children
  File "site-packages/lxml/html/soupparser.py", line 87, in _convert_children
  File "site-packages/lxml/html/soupparser.py", line 87, in _convert_children
  File "site-packages/lxml/html/soupparser.py", line 87, in _convert_children
  File "site-packages/lxml/html/soupparser.py", line 87, in _convert_children
  File "site-packages/lxml/html/soupparser.py", line 87, in _convert_children
  File "site-packages/lxml/html/soupparser.py", line 87, in _convert_children
  File "site-packages/lxml/html/soupparser.py", line 87, in _convert_children
  File "site-packages/lxml/html/soupparser.py", line 87, in _convert_children
  File "site-packages/lxml/html/soupparser.py", line 87, in _convert_children
  File "site-packages/lxml/html/soupparser.py", line 87, in _convert_children
  File "site-packages/lxml/html/soupparser.py", line 89, in _convert_children
  File "site-packages/lxml/html/soupparser.py", line 103, in _append_text
  File "lxml.etree.pyx", line 836, in lxml.etree._Element.tail.__set__ (src/lxml/lxml.etree.c:33384)
  File "apihelpers.pxi", line 668, in lxml.etree._setTailText (src/lxml/lxml.etree.c:15460)
  File "apihelpers.pxi", line 1295, in lxml.etree._utf8 (src/lxml/lxml.etree.c:20212)
ValueError: All strings must be XML compatible: Unicode or ASCII, no NULL bytes


Any pointers will be greatly appreciated.

Last edited by Starson17; 10-18-2011 at 02:23 PM.
mistersquid is offline   Reply With Quote