Skip to content

Error during Save As DXF when input SVG has pt units

Summary:

Save As dxf is not working when file has pt units.

Steps to reproduce:

  • open Inkscape
  • open Example file
  • Save As DXF

What happened?

Error when on save:

Traceback (most recent call last):
  File "/snap/inkscape/10533/share/inkscape/extensions/dxf_outlines.py", line 443, in <module>
    DxfOutlines().run()
  File "/snap/inkscape/10533/share/inkscape/extensions/inkex/base.py", line 231, in run
    self.save_raw(self.effect())
  File "/snap/inkscape/10533/share/inkscape/extensions/dxf_outlines.py", line 392, in effect
    header = header.replace("<unit specifier>", str(unit_map[unit]))
KeyError: 'pt'

What should have happened?

DXF file should be created.

Sample attachments:

test-file.svg

Version info

Inkscape 1.2.2 (732a01da63, 2022-12-09, custom)

    GLib version:     2.72.4
    GTK version:      3.24.33
    glibmm version:   2.66.2
    gtkmm version:    3.24.5
    libxml2 version:  2.9.13
    libxslt version:  1.1.34
    Cairo version:    1.16.0
    Pango version:    1.50.6
    HarfBuzz version: 2.7.4

    OS version:       Ubuntu Core 22
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information