View Single Post
Old 01-27-2012, 02:53 PM   #280
nickredding
onlinenewsreader.net
nickredding knows the difference between 'who' and 'whom'nickredding knows the difference between 'who' and 'whom'nickredding knows the difference between 'who' and 'whom'nickredding knows the difference between 'who' and 'whom'nickredding knows the difference between 'who' and 'whom'nickredding knows the difference between 'who' and 'whom'nickredding knows the difference between 'who' and 'whom'nickredding knows the difference between 'who' and 'whom'nickredding knows the difference between 'who' and 'whom'nickredding knows the difference between 'who' and 'whom'nickredding knows the difference between 'who' and 'whom'
 
Posts: 328
Karma: 10143
Join Date: Dec 2009
Location: Phoenix, AZ & Victoria, BC
Device: Kindle 3, Kindle Fire, IPad3, iPhone4, Playbook, HTC Inspire
Quote:
Originally Posted by KevinH View Post
Hi,

Even my new testcase showed just a 1 for those 4 bytes in the older mobi header. I have no idea what those bytes might mean.


My testcase did freak out the split code. I print the ofs and it values used in deletesectionrange and end up with an invalid ofs (it is negative) possibly because one of the original start values was 0xffffffff ? I am not sure.

I will try to track this down.

in split 9444436 418
in split 4220892 194
in split 976 196
in split -9443580 198

Traceback (most recent call last):
File "./mobi_unpack.py", line 919, in <module>
sys.exit(main())
File "./mobi_unpack.py", line 910, in main
unpackBook(infile, outdir)
File "./mobi_unpack.py", line 575, in unpackBook
mobisplit = mobi_split(infile)
File "/Users/kbhend/Desktop/nick_mobi_unpack_update5/mobi_split.py", line 242, in __init__
self.result_file8 = deletesectionrange(datain,0,datain_kf8-1)
File "/Users/kbhend/Desktop/nick_mobi_unpack_update5/mobi_split.py", line 105, in deletesectionrange
dataout = dataout[:first_pdb_record+i*8] + struct.pack('>L',ofs) + struct.pack('L',it) + dataout[first_pdb_record+i*8+8:]
struct.error: integer out of range for 'L' format code
Kevin - if you pm me the file I'll debug the mobi_split code
nickredding is offline   Reply With Quote