[PythonCAD] Re: [cad-linux] First hack at DWG reading for PythonCAD

Art Haas ahaas at airmail.net
Thu Aug 28 22:36:44 EDT 2003


On Thu, Aug 28, 2003 at 07:49:32PM -0500, Eric Wilhelm wrote:
> > The following was supposedly scribed by
> > Art Haas
> > on Thursday 28 August 2003 05:57 pm:
> 
> Sorry to freak out everybody's e-mail client as I switch addresses and jump 
> threads between mailing lists.
> 
> I'm looking at a fairly simple R14 file with the dwg.py and a fresh build of 
> python:
> $ ~/src/Python-2.2.3/python dwg.py sm14_chck.dwg
> <not sure where to snip>
> zombie: 0
> itemclassid: 1f2
> bitpos after itemclassid: 2278
> classnum: 506
> version: 0
> appname: 'AutoCAD 2000'
> cplusplusclassname: 'AcDbXrecord'
> classdxfname: 'XRECORD'
> zombie: 0
> itemclassid: 1f3
> bitpos after itemclassid: 2587
> Traceback (most recent call last):
>   File "dwg.py", line 4450, in ?
>     dump_info(_fh)
>   File "dwg.py", line 139, in dump_info
>     _cmap = decode_class_data(_class_data)
>   File "dwg.py", line 973, in decode_class_data
>     _bitpos, _classnum = get_bit_short(data, _bitpos)
>   File "dwg.py", line 4169, in get_bit_short
>     _sh = get_bits(data, 16, (offset + 2))
>   File "dwg.py", line 4408, in get_bits
>     _b2 = (data[_idx] & _mask2)
> IndexError: array index out of range
> 
> the file is only 36k.  What's the attachment policy on this list?
> 

I think I sent it up so that anything over 40K gets stopped. If you
can mail me the file directly that would be great. Don't send something
that is proprietary/secret/confidential etc. I'd like to get the file so
I can fix the bug and keep it as a test file for future iterations of
the reading code.

Art


-- 
Man once surrendering his reason, has no remaining guard against absurdities
the most monstrous, and like a ship without rudder, is the sport of every wind.

-Thomas Jefferson to James Smith, 1822



More information about the PythonCAD mailing list