
Aaron Spike wrote:
Alvin Penner wrote:
Aaron Spike-2 wrote:
Please check out Cuft. :-)
Hello Aaron, just for fun, tried to run the file gsd2txt.py. Downloaded various files from cuft and used my own little demo file http://www.nabble.com/file/p17849064/line.GSD line.GSD . I get the message : C:\Python25\MyDXF\CuFT>gsd2txt.py line.gsd Traceback (most recent call last): File "C:\Python25\MyDXF\CuFT\gsd2txt.py", line 34, in <module> g.fromGSD(file) File "C:\Python25\MyDXF\CuFT\cuft\gsd.py", line 605, in fromGSD index, group, type, count, data = lexer.next() File "C:\Python25\MyDXF\CuFT\cuft\gsd.py", line 418, in lexer if TYPEKEY[type]: IndexError: list index out of range
Am I perhaps missing a dependency of some sort?
Nope. When the error happens with your file type is 15 and I've never seen that value before. So the code doesn't know what to do with it.
I'll see what I can figure out.
svn up to revision 4. I've improved the handling of unexpected input. It doesn't crash anymore but your file appears to be entirely different than any other GSD file I've ever run through my script. Where did you get it? Perhaps you should try a few GSD files from the web, or I could send you some that I've tested my script with before just so you can see it working.
Aaron Spike