mecamira / dxf2gcode

Automatically exported from code.google.com/p/dxf2gcode
0 stars 0 forks source link

Exception thrown when block has no coordinates #17

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Try to load file test.dxf (attached). Program will throw exception:

Exception in Tkinter callback
Traceback (most recent call last):
  File "c:\Python27\lib\lib-tk\Tkinter.py", line 1410, in __call__
    return self.func(*args)
  File "dxf2gcode_b02.py", line 251, in Get_Load_File
    self.Load_File()
  File "dxf2gcode_b02.py", line 284, in Load_File
    self.values=dxf_import.Load_DXF(filename,self.config,self.textbox)
  File "C:\Users\misha\Desktop\compiling\dxf2gcode\src\dxf2gcode_b02_dxf_import.
py", line 66, in __init__
    self.blocks=self.Read_Blocks(blocks_pos)
  File "C:\Users\misha\Desktop\compiling\dxf2gcode\src\dxf2gcode_b02_dxf_import.
py", line 206, in Read_Blocks
    blocks.Entities[-1].basep.x=float(lp.line_pair[s].value)
TypeError: list indices must be integers, not NoneType

Attaching fixed version of dxf2gcode_b02_dxf_import module

Original issue reported on code.google.com by denisen...@gmail.com on 10 Aug 2011 at 3:50

Attachments:

GoogleCodeExporter commented 9 years ago
Added to the development branch of tkinter. Will be included in next compliled 
version / tag of the tkinter development branch.

Original comment by christian.kohloeffel on 10 Aug 2011 at 12:18