cnc-club / gcodetools

CAM extension for Inkscape to export paths to Gcode

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Inkscape 1.2 "TypeError: list indices must be integers or slices, not float"

kimstik opened this issue · comments

inkscape 1.2
I got following when I try to engrave simple triangle:

Traceback (most recent call last):
  File "C:\Program Files\Inkscape\share\inkscape\extensions\other\gcodetools\gcodetools.py", line 5930, in <module>
    Gcodetools().run()
  File "C:\Program Files\Inkscape\share\inkscape\extensions\inkex\base.py", line 231, in run
    self.save_raw(self.effect())
  File "C:\Program Files\Inkscape\share\inkscape\extensions\other\gcodetools\gcodetools.py", line 5881, in effect
    self.options.active_tab()
  File "C:\Program Files\Inkscape\share\inkscape\extensions\other\gcodetools\gcodetools.py", line 4936, in tab_engraving
    jjmin, iimin, w = get_biggest((x1, y1), (nx, ny))
  File "C:\Program Files\Inkscape\share\inkscape\extensions\other\gcodetools\gcodetools.py", line 4580, in get_biggest
    if abs(ii - i) == 2 and nlLT[j][(ii + i) / 2 - 1][3] <= 0:
TypeError: list indices must be integers or slices, not float

Commenting out lines 4580 and 4581 helps to get g-code.

time to time I see that:

Traceback (most recent call last):
  File "C:\Program Files\Inkscape\share\inkscape\extensions\other\gcodetools\gcodetools.py", line 5930, in <module>
    Gcodetools().run()
  File "C:\Program Files\Inkscape\share\inkscape\extensions\inkex\base.py", line 231, in run
    self.save_raw(self.effect())
  File "C:\Program Files\Inkscape\share\inkscape\extensions\other\gcodetools\gcodetools.py", line 5881, in effect
    self.options.active_tab()
  File "C:\Program Files\Inkscape\share\inkscape\extensions\other\gcodetools\gcodetools.py", line 4771, in tab_engraving
    gcode_3Dleft = self.my3Dlayer.add(Group(gcodetools="Gcode 3D L"))
AttributeError: 'NoneType' object has no attribute 'add'