error message when trying to save svg to dxf

Asked by Tina Hartsough on 2017-05-09

Traceback (most recent call last):
  File "dxf_outlines.py", line 360, in <module>
    e.affect()
  File "C:\Program Files\WindowsApps\25415Inkscape.Inkscape_0.92.1.0_x64__9waqn51p1ttv2\share\extensions\inkex.py", line 283, in affect
    self.effect()
  File "dxf_outlines.py", line 343, in effect
    h = self.unittouu(self.document.getroot().xpath('@height', namespaces=inkex.NSS)[0])
IndexError: list index out of range

Question information

Language:
English Edit question
Status:
Expired
For:
Inkscape Edit question
Assignee:
No assignee Edit question
Last query:
2017-05-15
Last reply:
2017-05-31
Hachmann (marenhachmann) said : #1

Hi Tina,

it seems to me that the extension cannot deal with a missing height (and probably also width) value in your SVG file.

Does it work correctly if you patch the file
C:\Program Files\WindowsApps\25415Inkscape.Inkscape_0.92.1.0_x64__9waqn51p1ttv2\share\extensions\dxf_outlines.py

by replacing line 343 by

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

?

If so, we should make a bug report and suggest a fix.

Kind Regards,
 Maren

Tina Hartsough (auburntina65) said : #2

Where do I go to patch the file. I have never used inkscape before today.

On 5/9/17, 4:53 PM, "Hachmann" <<email address hidden> on behalf of <email address hidden>> wrote:

    Your question #631890 on Inkscape changed:
    https://answers.launchpad.net/inkscape/+question/631890

    Hachmann posted a new comment:
    Hi Tina,

    it seems to me that the extension cannot deal with a missing height (and
    probably also width) value in your SVG file.

    Does it work correctly if you patch the file
    C:\Program Files\WindowsApps\25415Inkscape.Inkscape_0.92.1.0_x64__9waqn51p1ttv2\share\extensions\dxf_outlines.py

    by replacing line 343 by

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

    ?

    If so, we should make a bug report and suggest a fix.

    Kind Regards,
     Maren

    --
    You received this question notification because you asked the question.

Hachmann (marenhachmann) said : #3

Hi Tina,

you would need to open the file
C:\Program Files\WindowsApps\25415Inkscape.Inkscape_0.92.1.0_x64__9waqn51p1ttv2\share\extensions\dxf_outlines.py
with a text editor (like notepad, not with an office suite), and edit the mentioned line.

I have uploaded a version that might work, where the change has been made already:
https://inkscape.org/en/gallery/item/10988/dxf_outlines.py

Please, instead of editing the above-mentioned file, just rename it to something like dxf_outlines.py.old and copy the test version into the folder.

Kind Regards,
 Maren

Tina Hartsough (auburntina65) said : #4

I cannot find a folder in my ASus for Windows Apps. I cannot find where inkscape is on my computer to find any folders. Could you please help me.

Hachmann (marenhachmann) said : #5

Tina, please open your Windows explorer and just enter the path to the folder where the file lives (you can copy-paste):
C:\Program Files\WindowsApps\25415Inkscape.Inkscape_0.92.1.0_x64__9waqn51p1ttv2\share\extensions\

Here's a step by step guide on how to navigate the folders on your computer:
http://www.wikihow.com/Navigate-the-Windows-Directory

Kind Regards,
 Maren

Tina Hartsough (auburntina65) said : #6

Tried but it said I needed permission to save the file to Inkscape.
.

Hachmann (marenhachmann) said : #7

This sounds as if you need to do the action as an admin user on your computer - which makes sense, because you're modifying potentially vital files, not just your personal user configuration files.

Tina Hartsough (auburntina65) said : #8

I checked and I am the administrator listed on my computer but it still says destination folder access denied. You need permission to perform this action.

> On May 15, 2017, at 2:53 PM, Hachmann <email address hidden> wrote:
>
> Your question #631890 on Inkscape changed:
> https://answers.launchpad.net/inkscape/+question/631890
>
> Hachmann posted a new comment:
> This sounds as if you need to do the action as an admin user on your
> computer - which makes sense, because you're modifying potentially vital
> files, not just your personal user configuration files.
>
> --
> You received this question notification because you asked the question.

Tina Hartsough (auburntina65) said : #9

It looks like I need to be a trusted installer.

Launchpad Janitor (janitor) said : #10

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