View Single Post
Old 10-26-2009, 04:32 PM   #9
Junior Member
gsz began at the beginning.
Posts: 6
Karma: 10
Join Date: Oct 2009
Device: Sony PRS-505
I spent a bit more time narrowing this down and here's what I came up with:

The entire content is a single HTML file (removed everything else):

<META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Chapter 1. Introduction</title>
<table width="100%" border="0" cellspacing="0" cellpadding="0"><TR><td valign="top"><a name="ch01"></a><h2>Chapter 1. Introduction</H2>

If I try to convert this with "Linearize tables" turned on, it fails:

Creating EPUB Output...
Splitting on page-break
Splitting on page-break
Python function terminated unexpectedly
('utf8', '/*/*[2]/ha\xb6\x02:h2', 10, 11, 'unexpected code byte') (Error Code: 1)
Traceback (most recent call last):
File "", line 103, in main
File "", line 85, in run_entry_point
File "site-packages\calibre\utils\ipc\", line 90, in main
File "site-packages\calibre\gui2\convert\", line 19, in gui_convert
File "site-packages\calibre\ebooks\conversion\", line 827, in run
File "site-packages\calibre\ebooks\epub\", line 162, in convert
File "site-packages\calibre\ebooks\oeb\transforms\", line 56, in __call__
File "site-packages\calibre\ebooks\oeb\transforms\", line 66, in split_item
File "site-packages\calibre\ebooks\oeb\transforms\", line 175, in __init__
File "site-packages\calibre\ebooks\oeb\transforms\", line 215, in split_on_page_breaks
File "site-packages\calibre\ebooks\oeb\transforms\", line 283, in do_split
File "lxml.etree.pyx", line 1621, in lxml.etree._ElementTree.getpath (src/lxml/lxml.etree.c:17041)
File "apihelpers.pxi", line 1130, in lxml.etree.funicode (src/lxml/lxml.etree.c:36925)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xb6 in position 10: unexpected code byte

If I turn "Linearize tables" off, it works!

I hope this helps...
gsz is offline   Reply With Quote