Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 09-16-2008, 11:41 AM   #1
BrendenM
Member
BrendenM began at the beginning.
 
Posts: 20
Karma: 10
Join Date: Jan 2007
Device: PRS-500, Blackberry 8700c
[solved] lrfviewer & reader error after html conversion

I've converted a fairly decent sized html book (50+ chapters each ~30k) using the defaults of html2lrf with --ignore-tables. The conversion process seems to go smooth, not one single error or warning after tossing on the --ignore-tables parameter.

However when I open the lrf with lrfviewer I get the following error.
Code:
UnicodeDecodeError: 'utf16' codec can't decode bytes in position 1392-1393: illegal encoding
Failed to render document
Detailed traceback:
Traceback (most recent call last):
  File "build/bdist.linux-i686/egg/calibre/gui2/lrf_renderer/main.py", line 32, in run
  File "build/bdist.linux-i686/egg/calibre/ebooks/lrf/lrfparser.py", line 27, in parse
  File "build/bdist.linux-i686/egg/calibre/ebooks/lrf/lrfparser.py", line 55, in _parse_objects
  File "build/bdist.linux-i686/egg/calibre/ebooks/lrf/objects.py", line 819, in initialize
  File "build/bdist.linux-i686/egg/calibre/ebooks/lrf/objects.py", line 701, in add_text
  File "/usr/lib/python2.5/encodings/utf_16_le.py", line 16, in decode
    return codecs.utf_16_le_decode(input, errors, True)
UnicodeDecodeError: 'utf16' codec can't decode bytes in position 1392-1393: illegal encoding
I know lrfviewer is for testing purposes so I've also tried it on my 500 and WOW, instant hard lock and complete hard reboot after about a minute.

Any idea on what I should toss onto html2lrf to successfully generate the lrf?

Last edited by BrendenM; 09-16-2008 at 01:42 PM. Reason: problem solved
BrendenM is offline   Reply With Quote
Old 09-16-2008, 11:58 AM   #2
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 38,747
Karma: 19643753
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Aura H2O, Sony PRS-650, Sony PRS-T1, nook STR, iPad 1, iPhone 5
Can you link this eBook or maybe attach it here (if it is legal to do so)>
JSWolf is offline   Reply With Quote
 
Advertisement
Old 09-16-2008, 12:28 PM   #3
BrendenM
Member
BrendenM began at the beginning.
 
Posts: 20
Karma: 10
Join Date: Jan 2007
Device: PRS-500, Blackberry 8700c
Unfortunately I can't link the ebook.
BrendenM is offline   Reply With Quote
Old 09-16-2008, 12:40 PM   #4
BrendenM
Member
BrendenM began at the beginning.
 
Posts: 20
Karma: 10
Join Date: Jan 2007
Device: PRS-500, Blackberry 8700c
I think I figured it out. It was the --encoding option. I had to set it to --encoding="cp1252", the man information suggests cp-1252 however and that isn't accepted.

Last edited by BrendenM; 09-16-2008 at 01:42 PM. Reason: My english are not so good
BrendenM is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Conversion memory error (HTML->EPUB) doremifaso Calibre 4 06-25-2010 11:56 PM
conversion to FB2 error with & in title tselling Calibre 2 01-08-2010 12:46 AM
'utf8' codec can't decode bytes error (HTML to EPUB conversion) gsz Calibre 10 10-26-2009 07:29 PM
Is there a landscape mode in lrfviewer logan Calibre 3 01-21-2009 07:50 PM
HTML Conversion Error dedicated Calibre 12 12-18-2008 03:36 PM


All times are GMT -4. The time now is 01:12 PM.


MobileRead.com is a privately owned, operated and funded community.