View Single Post
Old 09-29-2014, 06:51 PM   #13
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,899
Karma: 6120478
Join Date: Nov 2009
Device: many
Hi JSWolf,
please run DumpMobiHeader_v018.py on that mobi and copy what values it has for cover offset and thumbnail offset in the EXTH metadata for the old Mobi header. I am betting that the ThumbOffset is 0xFFFFFFFF which means it's missing. If so I can give you a new mobi_opf.py to fix that issue. DumpMobiHeader is an extra Python script that I have added to the KindleUnpack zip archives on occasion. Any recent version would work.

If not, then please post a test case to the KindleUnpack forum and I will try to track it down.

KevinH

Quote:
Originally Posted by JSWolf View Post
I've come across an error trying to import a Mobi eBook from Amazon. I am using Windows 7 32-bit and Python 32-bit (version 2.7.6) from Python.org with the 32-bit Sigil.

Code:
Status: failed

Traceback (most recent call last):
  File "C:\Program Files\Sigil\plugin_launchers\\python\launcher.py", line 137, in launch
    self.exitcode = target_script.run(container)
  File "C:\Users\Jon\AppData\Local\sigil-ebook\sigil\plugins\KindleImport\plugin.py", line 111, in run
    mobidir, mobi_html, mobi_opf, mobiBaseName = mp.unpackMOBI(temp_dir)
  File "C:\Users\Jon\AppData\Local\sigil-ebook\sigil\plugins\KindleImport\mobi_stuff.py", line 92, in unpackMOBI
    mu = _mu.unpackBook(self.infile, outdir, epubver=self.ePubVersion, use_hd=self.useHDImages)
  File "C:\Users\Jon\AppData\Local\sigil-ebook\sigil\plugins\KindleImport\kindleunpack\kindleunpack.py", line 871, in unpackBook
    process_all_mobi_headers(files, apnxfile, sect, mhlst, K8Boundary, False, epubver, use_hd)
  File "C:\Users\Jon\AppData\Local\sigil-ebook\sigil\plugins\KindleImport\kindleunpack\kindleunpack.py", line 794, in process_all_mobi_headers
    processMobi7(mh, metadata, sect, files, imgnames)
  File "C:\Users\Jon\AppData\Local\sigil-ebook\sigil\plugins\KindleImport\kindleunpack\kindleunpack.py", line 641, in processMobi7
    opf.writeOPF()
  File "C:\Users\Jon\AppData\Local\sigil-ebook\sigil\plugins\KindleImport\kindleunpack\mobi_opf.py", line 529, in writeOPF
    data = self.buildMobi7OPF()
  File "C:\Users\Jon\AppData\Local\sigil-ebook\sigil\plugins\KindleImport\kindleunpack\mobi_opf.py", line 467, in buildMobi7OPF
    opf_metadata = self.buildOPFMetadata(metadata_tag)
  File "C:\Users\Jon\AppData\Local\sigil-ebook\sigil\plugins\KindleImport\kindleunpack\mobi_opf.py", line 300, in buildOPFMetadata
    imageName = self.imgnames[imageNumber]
IndexError: cannot fit 'long' into an index-sized integer
Error: cannot fit 'long' into an index-sized integer
KevinH is offline   Reply With Quote