Error message when saving

Asked by Nicki Mc

I'm a first time user of Inkscape, so please bare with me. I'm running Mac OS 10.6.6. When I attempt to save a file in .dxf format, I receive the following error message. The resulting file that is created in ".dxf" format is unreadable. Any assistance you can provide here would be much appreciated.

Many thanks. ~Nicki

~~~~~~~

Inkscape has received additional data from the script executed. The script did not return an error, but this may indicate the results will not be as expected.

The fantastic lxml wrapper for libxml2 is required by inkex.py and therefore this extension. Please download and install the latest version from http://cheeseshop.python.org/pypi/lxml/, or install it through your package manager by a command like: sudo apt-get install python-lxml

Question information

Language:
English Edit question
Status:
Solved
For:
Inkscape Edit question
Assignee:
No assignee Edit question
Solved by:
su_v
Solved:
Last query:
Last reply:
Revision history for this message
su_v (suv-lp) said :
#1

> The fantastic lxml wrapper for libxml2 (…)

Inkscape 0.47 and 0.48.0 on Mac OS X 10.6 Snow Leopard have a known bug to fail when running Python-based extensions (saving a copy as DXF is calling a python-based output extension).

This problem was solved for the recently uploaded, but not yet publicly announced bug-fix release 0.48.1:
Install Inkscape 0.48.1 (get 'Inkscape-0.48.1-1-LEOPARD+.dmg') from <http://sourceforge.net/projects/inkscape/files/inkscape/0.48.1/> to solve the problem.

Related bug report:
Bug #482993 “Inkscape extensions do not work on MacOS X 10.6 (Snow Leopard)”
<https://bugs.launchpad.net/inkscape/+bug/482993>

> The resulting file that is created in ".dxf" format is unreadable.

It is most likely just zero bytes big (DXF files are plain text files, you can open them with TextEdit to look at the content directly).

Most likely addressed for Inkscape 0.49 (don't create an empty file if an error occurs):
Bug #652943 “Aborted output extensions create an empty file”:
<https://bugs.launchpad.net/inkscape/+bug/652943>

Revision history for this message
su_v (suv-lp) said :
#2

> I'm a first time user of Inkscape (…) attempt to save a file in .dxf format

Note that - once the other error is solved - for saving as DXF files you need to convert objects like text, rectangles and clones to regular paths first (using menu 'Path > Object to Path') else those objects will be missing in the DXF file.

Another tip if you just recently started using Inkscape on a Mac: please change the X11 preferences for the pasteboard as see in this screenshot:
<https://bugs.launchpad.net/inkscape/+bug/307005/+attachment/1052046/+files/XQuartz-clipboard-preferences.png>
and read in the FAQ for a short description of this known conflict between X11/Xquartz and Inkscape:
<http://wiki.inkscape.org/wiki/index.php/FAQ#Copying_and_pasting_in_Inkscape_creates_pixellated_images_instead_of_copying_the_vector_objects>
This issue might also affect DXF export because such embedded bitmap images can't be exported to DXF either because they no longer are vector objects.

Revision history for this message
Nicki Mc (nmcguill) said :
#3

Hopefully this email..
THANK YOU.
I was about to throw in the towel until another user suggested I contact support. This if fabulous! Thanks!

> To: <email address hidden>
> From: <email address hidden>
> Subject: Re: [Question #146050]: Error message when saving
> Date: Sun, 20 Feb 2011 05:37:15 +0000
>
> Your question #146050 on Inkscape changed:
> https://answers.launchpad.net/inkscape/+question/146050
>
> ~suv posted a new comment:
> > I'm a first time user of Inkscape (…) attempt to save a file in .dxf
> format
>
> Note that - once the other error is solved - for saving as DXF files you
> need to convert objects like text, rectangles and clones to regular
> paths first (using menu 'Path > Object to Path') else those objects will
> be missing in the DXF file.
>
>
> Another tip if you just recently started using Inkscape on a Mac: please change the X11 preferences for the pasteboard as see in this screenshot:
> <https://bugs.launchpad.net/inkscape/+bug/307005/+attachment/1052046/+files/XQuartz-clipboard-preferences.png>
> and read in the FAQ for a short description of this known conflict between X11/Xquartz and Inkscape:
> <http://wiki.inkscape.org/wiki/index.php/FAQ#Copying_and_pasting_in_Inkscape_creates_pixellated_images_instead_of_copying_the_vector_objects>
> This issue might also affect DXF export because such embedded bitmap images can't be exported to DXF either because they no longer are vector objects.
>
> --
> You received this question notification because you are a direct
> subscriber of the question.

Revision history for this message
Best su_v (suv-lp) said :
#4

Could you close the question if your issue has been solved? You can use one of the links at the bottom of the notification. This helps other users searching for answers (solved questions) as well as those trying to answer open questions.

tia, ~suv

Revision history for this message
Nicki Mc (nmcguill) said :
#5

Thanks ~suv, that solved my question.

Revision history for this message
Andriette (andriettef) said :
#6

I did a design in Inkscape and wanted to save it to .dxf, but when I do that it says:
Traceback (most recent call last):

  File "dxf_outlines.py", line 345, in <module>

    e.affect()

  File "C:\Program Files (x86)\Inkscape\share\extensions\inkex.py", line 264, in affect

    self.parse()

  File "C:\Program Files (x86)\Inkscape\share\extensions\inkex.py", line 187, in parse

    self.document = etree.parse(stream, parser=p)

  File "lxml.etree.pyx", line 2692, in lxml.etree.parse (src/lxml/lxml.etree.c:49594)

  File "parser.pxi", line 1522, in lxml.etree._parseDocument (src/lxml/lxml.etree.c:71582)

  File "parser.pxi", line 1552, in lxml.etree._parseFilelikeDocument (src/lxml/lxml.etree.c:71892)

  File "parser.pxi", line 1435, in lxml.etree._parseDocFromFilelike (src/lxml/lxml.etree.c:70807)

  File "parser.pxi", line 997, in lxml.etree._BaseParser._parseDocFromFilelike (src/lxml/lxml.etree.c:67948)

  File "parser.pxi", line 539, in lxml.etree._ParserContext._handleParseResultDoc (src/lxml/lxml.etree.c:63824)

  File "parser.pxi", line 625, in lxml.etree._handleParseResult (src/lxml/lxml.etree.c:64745)

  File "parser.pxi", line 565, in lxml.etree._raiseParseError (src/lxml/lxml.etree.c:64088)

lxml.etree.XMLSyntaxError: xmlns:ns6: '&#38;#38;#38;#38;#38;#38;#38;#38;#38;#38;#38;ns_ai;' is not a valid URI, line 5, column 68

I have didn't do anything different from what I did before. I even went and uninstalled Inkscape and found the latest version and installed that, still the same.

Please help me to fix this.

Revision history for this message
Chris Lingwood (n-chrps-4) said :
#7

I appreciate this is of no use to Andriette but I've not seen the solution to their problem posted elsewhere.

This happens if you are using an svg created by adobe illustrator. It creates some tags that the exporter doesn't like. Thankfully it's easily fixed, Open your svg as a text file and delete the tags it doesn't like. You'll find you don't need a lot of the file.

Delete the line that looks a bit like this:

xmlns:ns="&amp;#38;#38;#38;ns_ai;"

Then delete this bit that looks like this:
<foreignObject
       id="foreignObject5"
       height="1"
       width="1"
       y="0"
       x="0"
       requiredExtensions="http://ns.adobe.com/AdobeIllustrator/10.0/"><ns:pgfRef
         xlink:href="#adobe_illustrator_pgf" /></foreignObject>

And the GIANT node at the end that has these tags <ns:pgf>...</ns:pgf>

Not only will your svg be SIGNIFICANTLY smaller but you can then export. I don't know what illustrator thinks of losing these tags, inkscape doesn't care.