TypeError: string indices must be integers
Opened this issue · 2 comments
When attempting to convert a .chm file to an OBJ via the command line in Windows 7, dlhd.py throws a TypeError on line 80, specifically "TypeError: string indices must be integers" as stated in the title. This is on the latest commit of the files from August 12 of 2017. The impression I got from the Current Status section was that chm to obj conversion was functional, so I'm not sure which side the issue is on.
Attached is the full printout from the Command Prompt console.
FFCCP TypeError string indices.txt
I've located the problem
It comes down to the fact that the dlst
variable in Dlhd object isn't just a list, but a dictionary, however in his function dlst2obj
, he seems to have made a mistake (perhaps a forgotten commit / update)
just change at line 79 in dlhd.py :
for lst in dlst:
-- to --> for lst in dlst["data"]:
That seems to have done the trick so far, thank you.