Error (index out of range) when saving SVG as DXF

Asked by Matthew Zhu on 2017-11-27

This is a near-duplicate of the expired question here:


What I was trying to do: I imported an SVG and tried to save it as a DXF.


Expected behavior: Save without error

Actual behavior: Dialog box pops up with an error that approximately looks like:

Traceback (most recent call last):
  File "", line 360, in <module>
  File "/usr/share/inkscape/", line 283, in affect
  File "", line 344, in effect
    h = self.unittouu(self.document.getroot().xpath('@height', namespaces=inkex.NSS)[0])
IndexError: list index out of range

and then a dialog saying that the save failed.


Tech details: running Inkscape 0.92.2 on Linux Ubuntu 18.04


Fix: The fix detailed in the linked question worked for me. As suggested by marenhachmann, replacing the offending line with:

h = self.unittouu(self.getDocumentHeight())

produces the expected behavior.

Question information

English Edit question
Inkscape Edit question
No assignee Edit question
Last query:
Last reply:
Hachmann (marenhachmann) said : #1

Great :)

Hachmann (marenhachmann) said : #2

Btw. which version of Inkscape are you using?

Matthew Zhu (mz496) said : #3

I'm using Inkscape 0.92.2 for Linux.

Hachmann (marenhachmann) said : #4

Thanks for the reminder, Matthew. I've opened a merge request with the suggested fix:

Launchpad Janitor (janitor) said : #5

This question was expired because it remained in the 'Open' state without activity for the last 15 days.