View Single Post
Old 07-07-2010, 01:09 AM   #3
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 8,800
Karma: 12528001
Join Date: Feb 2009
Location: North Carolina
Device: Nexus 7
Quote:
Originally Posted by wallace.webmail View Post
I have converted a bunch of my kindle books already.. but for some reason this one won't.

(FYI... I have already removed the DRM)

Malformed markup, parsing using BeautifulSoup
MOBI markup appears to contain random bytes. Stripping.
Extracting text...
Adding anchors...
Extracting images...
Cleaning up HTML...
Parsing HTML...
Malformed markup, parsing using BeautifulSoup
MOBI markup appears to contain random bytes. Stripping.

Any insight?

Thanks.
Your DRM conversion was only 99.99% successful. This means you have some random bytes that are hanging around that didn't get decrypted. You can read 99.99% of the book in any reader and probably chalk up the rest to bad OCR conversion. But it prevents this book from being converted.

There are various reasons this happens, I know enough that I can say I don't know all the reasons it might have happened. One reason it happens is using a older version of mobidedrm, but even the most current version might have trouble with some files. You can see if you have the latest mobidedrm by Googling Apprentice Alf's Blog.

Just reading the mobidedrm change log (included inside each file) below, you can see the problems that keep occurring. View the mobidedrm.py as a text file to see your version/log.

Spoiler:
Code:
Changelog
#  0.01 - Initial version
#  0.02 - Huffdic compressed books were not properly decrypted
#  0.03 - Wasn't checking MOBI header length
#  0.04 - Wasn't sanity checking size of data record
#  0.05 - It seems that the extra data flags take two bytes not four
#  0.06 - And that low bit does mean something after all :-)
#  0.07 - The extra data flags aren't present in MOBI header < 0xE8 in size
#  0.08 - ...and also not in Mobi header version < 6
#  0.09 - ...but they are there with Mobi header version 6, header size 0xE4!
#  0.10 - Outputs unencrypted files as-is, so that when run as a Calibre
#         import filter it works when importing unencrypted files.
#         Also now handles encrypted files that don't need a specific PID.
#  0.11 - use autoflushed stdout and proper return values
#  0.12 - Fix for problems with metadata import as Calibre plugin, report errors
#  0.13 - Formatting fixes: retabbed file, removed trailing whitespace
#         and extra blank lines, converted CR/LF pairs at ends of each line,
#         and other cosmetic fixes.
#  0.14 - Working out when the extra data flags are present has been problematic
#         Versions 7 through 9 have tried to tweak the conditions, but have been
#         only partially successful. Closer examination of lots of sample
#         files reveals that a confusin has arisen because trailing data entries
#         are not encrypted, but it turns out that the multibyte entries
#         in utf8 file are encrypted. (Although neither kind gets compressed.)
#         This knowledge leads to a simplification of the test for the 
#         trailing data byte flags - version 5 and higher AND header size >= 0xE4.

PS. When posting a giant error log wrap the error log in code tags (the #) then wrap it in spoiler tags (the crossed out eye).
DoctorOhh is offline   Reply With Quote