11-25-2008, 03:26 AM | #1 |
Fanatic
Posts: 574
Karma: 138556
Join Date: May 2006
Device: PRS505
|
Conversion errors (encoding?)
Trying to convert an html file, I get the following exception:
Code:
Job: **Convert book: ###############** **tuple**: ('ValueError', u'unichr() arg not in range(0x10000) (narrow Python build)') **Traceback**: Traceback (most recent call last): File "parallel.py", line 928, in worker File "parallel.py", line 886, in work File "C:\Program Files\calibre\library.zip\calibre\ebooks\lrf\any\convert_from.py", line 192, in main File "C:\Program Files\calibre\library.zip\calibre\ebooks\lrf\any\convert_from.py", line 162, in process_file File "C:\Program Files\calibre\library.zip\calibre\ebooks\lrf\html\convert_from.py", line 1918, in process_file File "C:\Program Files\calibre\library.zip\calibre\ebooks\lrf\html\convert_from.py", line 273, in __init__ File "C:\Program Files\calibre\library.zip\calibre\ebooks\lrf\html\convert_from.py", line 387, in add_file File "C:\Program Files\calibre\library.zip\calibre\ebooks\lrf\html\convert_from.py", line 330, in preprocess File "calibre\ebooks\BeautifulSoup.pyo", line 1432, in __init__ File "calibre\ebooks\BeautifulSoup.pyo", line 1055, in __init__ File "calibre\ebooks\BeautifulSoup.pyo", line 1084, in _feed File "calibre\__init__.pyo", line 382, in entity_to_unicode ValueError: unichr() arg not in range(0x10000) (narrow Python build) **Log**: Processing u'calibre_0.4.106_f8it75.html' Parsing HTML... ('ValueError', u'unichr() arg not in range(0x10000) (narrow Python build)') Traceback (most recent call last): File "parallel.py", line 928, in worker File "parallel.py", line 886, in work File "C:\Program Files\calibre\library.zip\calibre\ebooks\lrf\any\convert_from.py", line 192, in main File "C:\Program Files\calibre\library.zip\calibre\ebooks\lrf\any\convert_from.py", line 162, in process_file File "C:\Program Files\calibre\library.zip\calibre\ebooks\lrf\html\convert_from.py", line 1918, in process_file File "C:\Program Files\calibre\library.zip\calibre\ebooks\lrf\html\convert_from.py", line 273, in __init__ File "C:\Program Files\calibre\library.zip\calibre\ebooks\lrf\html\convert_from.py", line 387, in add_file File "C:\Program Files\calibre\library.zip\calibre\ebooks\lrf\html\convert_from.py", line 330, in preprocess File "calibre\ebooks\BeautifulSoup.pyo", line 1432, in __init__ File "calibre\ebooks\BeautifulSoup.pyo", line 1055, in __init__ File "calibre\ebooks\BeautifulSoup.pyo", line 1084, in _feed File "calibre\__init__.pyo", line 382, in entity_to_unicode ValueError: unichr() arg not in range(0x10000) (narrow Python build) |
11-25-2008, 01:03 PM | #2 |
creator of calibre
Posts: 43,856
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
This is caused byt he HTML file having numerical entities with numbers that are not valid in the specified encoding. Numerical entites are of the form &1234; or &x1234; Where the numbers could be anything
|
Advert | |
|
11-25-2008, 02:11 PM | #3 | |
Fanatic
Posts: 574
Karma: 138556
Join Date: May 2006
Device: PRS505
|
Quote:
There are, indeed, quite a few of these spread throughout the file, but Opera and FF reads it just fine. How do I change it? Is there a program that will convert it for me to some other encoding? |
|
11-25-2008, 02:23 PM | #4 |
creator of calibre
Posts: 43,856
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
open a ticket and attach the file
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Encoding | prusaks | Recipes | 0 | 09-27-2010 06:25 AM |
Calibre Conversion Errors | mrbillb | Calibre | 16 | 09-10-2010 11:21 PM |
Conversion to Mobi to ePub errors | erik_reader | Conversion | 5 | 08-07-2010 02:03 AM |
Calibre conversion errors? | nick_f | Sony Reader | 2 | 03-03-2009 05:44 AM |
encoding errors in feeds under the new release | alexxxm | Calibre | 2 | 11-26-2008 12:44 PM |