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 10-02-2009, 01:30 AM   #1
HansTWN
Wizard
HansTWN ought to be getting tired of karma fortunes by now.HansTWN ought to be getting tired of karma fortunes by now.HansTWN ought to be getting tired of karma fortunes by now.HansTWN ought to be getting tired of karma fortunes by now.HansTWN ought to be getting tired of karma fortunes by now.HansTWN ought to be getting tired of karma fortunes by now.HansTWN ought to be getting tired of karma fortunes by now.HansTWN ought to be getting tired of karma fortunes by now.HansTWN ought to be getting tired of karma fortunes by now.HansTWN ought to be getting tired of karma fortunes by now.HansTWN ought to be getting tired of karma fortunes by now.
 
Posts: 4,538
Karma: 264065402
Join Date: Jun 2009
Location: Taiwan
Device: HP Touchpad, Sony Duo 13, Lumia 920, Kobo Aura HD
Unicode decode error

I am trying to convert an Amazon *.azw file. After running for a while I get the following error message:

Unicode decode error: 'utf8' codec can't decode byte 0x8b in position 674: unexpected code byte.

That sounds to me as if the file has no DRM protection, but rather it is a conversion error only. Any solution? I am using the latest calibre version, 0.6.15.
HansTWN is offline   Reply With Quote
Old 10-02-2009, 09:55 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,778
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Post the full error message.
kovidgoyal is offline   Reply With Quote
Old 10-02-2009, 10:04 AM   #3
ahi
Wizard
ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.
 
Posts: 1,790
Karma: 507333
Join Date: May 2009
Device: none
Quote:
Originally Posted by kovidgoyal View Post
Post the full error message.
Do you feel the lure of Python 3?

- Ahi
ahi is offline   Reply With Quote
Old 10-02-2009, 10:09 AM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,778
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by ahi View Post
Do you feel the lure of Python 3?

- Ahi
Python 3 wouldn't help with this. This error involves the decoding of the files contents. In python 3 they would simply be the bytes data type and would still need to be decoded.
kovidgoyal is offline   Reply With Quote
Old 10-02-2009, 10:25 AM   #5
ahi
Wizard
ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.
 
Posts: 1,790
Karma: 507333
Join Date: May 2009
Device: none
Quote:
Originally Posted by kovidgoyal View Post
Python 3 wouldn't help with this. This error involves the decoding of the files contents. In python 3 they would simply be the bytes data type and would still need to be decoded.
Don't these UnicodeDecode errors usually result from encoding conversion or encoding mixing? All such errors disappeared in pacify when I switched to Python 3.

- Ahi
ahi is offline   Reply With Quote
Old 10-02-2009, 10:29 AM   #6
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,778
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
No The largest source of Unicode errors are typically files that either don't declare their encoding (calibre uses the chardet library to try to guess it in this case) or files that declare an incorrect encoding/have corrupted data (which is what I suspect in this case).
kovidgoyal is offline   Reply With Quote
Old 10-02-2009, 11:02 AM   #7
ahi
Wizard
ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.
 
Posts: 1,790
Karma: 507333
Join Date: May 2009
Device: none
Quote:
Originally Posted by kovidgoyal View Post
No The largest source of Unicode errors are typically files that either don't declare their encoding (calibre uses the chardet library to try to guess it in this case) or files that declare an incorrect encoding/have corrupted data (which is what I suspect in this case).
Ok... true enough, that wouldn't be address by Python 3.

- Ahi
ahi is offline   Reply With Quote
Old 10-02-2009, 11:43 PM   #8
HansTWN
Wizard
HansTWN ought to be getting tired of karma fortunes by now.HansTWN ought to be getting tired of karma fortunes by now.HansTWN ought to be getting tired of karma fortunes by now.HansTWN ought to be getting tired of karma fortunes by now.HansTWN ought to be getting tired of karma fortunes by now.HansTWN ought to be getting tired of karma fortunes by now.HansTWN ought to be getting tired of karma fortunes by now.HansTWN ought to be getting tired of karma fortunes by now.HansTWN ought to be getting tired of karma fortunes by now.HansTWN ought to be getting tired of karma fortunes by now.HansTWN ought to be getting tired of karma fortunes by now.
 
Posts: 4,538
Karma: 264065402
Join Date: Jun 2009
Location: Taiwan
Device: HP Touchpad, Sony Duo 13, Lumia 920, Kobo Aura HD
Quote:
Originally Posted by kovidgoyal View Post
Post the full error message.
That was the complete error message. Title of the pop-up window is ERROR: ERROR: Unhandled exception.
HansTWN is offline   Reply With Quote
Old 10-03-2009, 12:05 AM   #9
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,778
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Click the show details button
kovidgoyal is offline   Reply With Quote
Old 10-03-2009, 09:46 PM   #10
HansTWN
Wizard
HansTWN ought to be getting tired of karma fortunes by now.HansTWN ought to be getting tired of karma fortunes by now.HansTWN ought to be getting tired of karma fortunes by now.HansTWN ought to be getting tired of karma fortunes by now.HansTWN ought to be getting tired of karma fortunes by now.HansTWN ought to be getting tired of karma fortunes by now.HansTWN ought to be getting tired of karma fortunes by now.HansTWN ought to be getting tired of karma fortunes by now.HansTWN ought to be getting tired of karma fortunes by now.HansTWN ought to be getting tired of karma fortunes by now.HansTWN ought to be getting tired of karma fortunes by now.
 
Posts: 4,538
Karma: 264065402
Join Date: Jun 2009
Location: Taiwan
Device: HP Touchpad, Sony Duo 13, Lumia 920, Kobo Aura HD
Quote:
Originally Posted by kovidgoyal View Post
Click the show details button
Sorry! Not my day

Traceback (most recent call last):
File "calibre\gui2\__init__.pyo", line 234, in dispatch
File "main.py", line 1248, in book_converted
File "main.py", line 1556, in job_exception
File "calibre\utils\ipc\job.pyo", line 134, in details
File "encodings\utf_8.pyo", line 16, in decode
UnicodeDecodeError: 'utf8' codec can't decode byte 0x8b in position 674: unexpected code byte
HansTWN is offline   Reply With Quote
Old 10-04-2009, 11:36 AM   #11
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,778
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Will be fixed in next release.
kovidgoyal is offline   Reply With Quote
Old 12-11-2009, 02:08 PM   #12
ddavtian
Addict
ddavtian has a complete set of Star Wars action figures.ddavtian has a complete set of Star Wars action figures.ddavtian has a complete set of Star Wars action figures.ddavtian has a complete set of Star Wars action figures.
 
Posts: 271
Karma: 332
Join Date: Nov 2003
Location: San Francisco, USA
Device: Sage, Elipsa, Oasis, Galaxy Tab 8U, S22U
Kovid, I'm opening an old thread. I got similar error when trying to convert from epub to mobi (or lrf).
I'm using 0.6.26 on windows 7. Is this something that can be fixed in calibre or it's a local error?

Thanks in advance.



... lots of lines ...
File "extensions.pxi", line 648, in lxml.etree._buildElementStringResult (src/lxml/lxml.etree.c:99775)
File "apihelpers.pxi", line 1232, in lxml.etree.funicode (src/lxml/lxml.etree.c:19564)
UnicodeDecodeError: 'utf8' codec can't decode byte 0x92 in position 8: unexpected code byte
ddavtian is offline   Reply With Quote
Old 12-11-2009, 04:25 PM   #13
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,778
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
that's a different error. hard to say more without looking at the file in question.
kovidgoyal is offline   Reply With Quote
Old 12-11-2009, 06:38 PM   #14
ddavtian
Addict
ddavtian has a complete set of Star Wars action figures.ddavtian has a complete set of Star Wars action figures.ddavtian has a complete set of Star Wars action figures.ddavtian has a complete set of Star Wars action figures.
 
Posts: 271
Karma: 332
Join Date: Nov 2003
Location: San Francisco, USA
Device: Sage, Elipsa, Oasis, Galaxy Tab 8U, S22U
I'd like to share the book with you, but it's a large file, 18Mb. I guess too big for email?

It's one of my liberated epub books from Sony, wanted to convert for Kindle.


EDIT: gmail says the max size is 25Mb. Is there a way I can email it to you Kovid?
ddavtian is offline   Reply With Quote
Old 12-11-2009, 07:42 PM   #15
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,778
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
yeah my gmail id is the same as my mobileread id
kovidgoyal 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
Unicode support in K3 tomsem Amazon Kindle 22 09-02-2010 04:14 PM
couldn't decode julius_the_cat Calibre 1 08-06-2010 12:39 PM
ERROR: Error: Error communicating with device JWood Calibre 10 04-20-2010 07:28 PM
'utf8' codec can't decode bytes error (HTML to EPUB conversion) gsz Calibre 10 10-26-2009 06:29 PM
Python Unicode Demystified ahi Workshop 2 09-18-2009 12:45 PM


All times are GMT -4. The time now is 07:44 AM.


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