Skip to content

DXF export hits max recursion depth with deeply grouped objected

Summary:

Get the following error when exporting a pdf to a dxf

Steps to reproduce:

  • open file
  • save as...dxf

What happened?


Traceback (most recent call last):
  File "dxf_outlines.py", line 332, in <module>
    DxfOutlines().run()
  File "C:\Program Files\Inkscape\share\inkscape\extensions\inkex\base.py", line 140, in run
    self.save_raw(self.effect())
  File "dxf_outlines.py", line 317, in effect
    self.process_group(doc)
  File "dxf_outlines.py", line 265, in process_group
    self.process_group(node)
  File "dxf_outlines.py", line 265, in process_group
    self.process_group(node)
  File "dxf_outlines.py", line 265, in process_group
    self.process_group(node)
  [Previous line repeated 979 more times]
  File "dxf_outlines.py", line 260, in process_group
    trans = group.get('transform')
  File "C:\Program Files\Inkscape\share\inkscape\extensions\inkex\elements\_base.py", line 175, in get
    value = getattr(self, prop, None)
  File "C:\Program Files\Inkscape\share\inkscape\extensions\inkex\elements\_base.py", line 153, in __getattr__
    setattr(self, name, value)
  File "C:\Program Files\Inkscape\share\inkscape\extensions\inkex\elements\_base.py", line 165, in __setattr__
    self.attrib[attr] = str(value)
  File "C:\Program Files\Inkscape\share\inkscape\extensions\inkex\transforms.py", line 501, in __str__
    if not self:
  File "C:\Program Files\Inkscape\share\inkscape\extensions\inkex\transforms.py", line 363, in __bool__
    return not self.__eq__(Transform())
  File "C:\Program Files\Inkscape\share\inkscape\extensions\inkex\transforms.py", line 524, in __eq__
    for l, r in zip(self.to_hexad(), Transform(matrix).to_hexad()))
  File "C:\Program Files\Inkscape\share\inkscape\extensions\inkex\transforms.py", line 312, in __init__
    self._set_matrix(matrix)
  File "C:\Program Files\Inkscape\share\inkscape\extensions\inkex\transforms.py", line 321, in _set_matrix
    if isinstance(matrix, (str, unicode)):
RecursionError: maximum recursion depth exceeded in __instancecheck__

What should have happened?

No error

Sample attachments:

file: https://www.dropbox.com/s/4lmkni2tyi8y6qk/Existing%20Floor%20plan.pdf?dl=0

Version Info:

  • Inkscape Version: 1.0.2-2 (e86c870879, 2021-01-15)
  • Operating System: Windows 10
  • Operating System version: ...
Edited by Nathan Lee
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information