Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 09-16-2008, 10:41 AM   #1
BrendenM
Member
BrendenM began at the beginning.
 
Posts: 24
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 12:42 PM. Reason: problem solved
BrendenM is offline   Reply With Quote
Old 09-16-2008, 10: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: 73,976
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Can you link this eBook or maybe attach it here (if it is legal to do so)>
JSWolf is offline   Reply With Quote
Advert
Old 09-16-2008, 11:28 AM   #3
BrendenM
Member
BrendenM began at the beginning.
 
Posts: 24
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, 11:40 AM   #4
BrendenM
Member
BrendenM began at the beginning.
 
Posts: 24
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 12:42 PM. Reason: My english are not so good
BrendenM is offline   Reply With Quote
Reply


Forum Jump

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


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


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