Hi Doitsu,
Does the old mobi_dict create the same error or is this error directly related to the changes I made?
There are simply too many struct.unpack calls to know where this might be happening without access to a test case and adding lots of extra print statements.
Take care,
KevinH
Quote:
Originally Posted by Doitsu
Thanks again for your work!
The updated version worked great with my home-made, Mobipocket Creator generated dictionary, but still seems to have problems with some Kindlegen compiled dictionaries.
For example, when I decompiled the DeDRMed version of the default monolingual Oxford Dictionary of English (B003WUYRGI_EBOK.azw) for testing purposes, the reverse-engineered .html file didn't contain a single <idx:infl> tag nor multiple <idx:orth> tags, and I know for sure that this dictionary contains inflections.
The script failed with the default monolingual French Kindle dictionary, (B005F12G6U_EBOK.azw). I've got the following error message:
Code:
Read dictionary index data
Parsing dictionary index data 12200
ocnt 0, oentries 0, op1 0, op2 0, otagx 0
parsed INDX header:
len C0 nul1 0 type 1 gen 0 start E82C count 9D8 code FFFFFFFF lng FFFFFFFF total 0 ordt 0 ligt 0 nligt 0 nctoc 0
{'count': 2520, 'nctoc': 0, 'code': 4294967295L, 'nul1': 0, 'len': 192, 'ligt': 0, 'start': 59436, 'nligt': 0, 'ordt': 0, 'lng': 4294967295L, 'total': 0, 'type': 1, 'gen': 0} None None
Error: unpack requires a string argument of length 0
Error: Unpacking Failed
I'll try to create a test case with compressed and uncompressed Mobipocket and KindleGen generated dictionaries for you tomorrow.
|