Will not save .xcf file.

Bug #642417 reported by Jeff Hack on 2010-09-18
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Inkscape
Medium
Unassigned
inkscape (Ubuntu)
Low
Unassigned

Bug Description

Ubuntu Karmic 9.10. Inkscape 0.47. I try to save as .xcf but get this output and empty file.

/usr/share/inkscape/extensions/gimp_xcf.py:98: DeprecationWarning: os.popen3 is deprecated. Use the subprocess module.
  _,f,err = os.popen3(command,'r')
Traceback (most recent call last):
  File "/usr/share/inkscape/extensions/gimp_xcf.py", line 173, in <module>
    e.affect()
  File "/usr/share/inkscape/extensions/inkex.py", line 207, in affect
    self.effect()
  File "/usr/share/inkscape/extensions/gimp_xcf.py", line 167, in effect
    x = open(xcf, 'r')
IOError: [Errno 2] No such file or directory: '/tmp/tmpMJPBGs/CleanVoltLogoAlberta.xcf'

Not sure how to correct.

su_v (suv-lp) wrote :

Does the error occur with every SVG file you try to save as XCF file or only with some files?
Can you attach a sample SVG file that fails to save as XCF file?

Possibly related to bug #485027 “Export to Gimp XCF returns deprecation warnings” (fixed in 0.48), though AFAIU the deprecation warning should not prevent the extension from working (it's just a warning). Which Python version do you have installed?

tags: added: exporting xcf
Download full text (13.6 KiB)

Hell. Thanks for the prompt reply. I have python ver. 2.6.4. I will
attach a file. Yes, all do the same. "Cannot save". Have downloaded both
tar.bz2 and tar.gz. None will configure. This is extracted from tar.bz2.

This is what happens:

hivolt@hivolt-laptop:~$ cd /home/hivolt/Desktop/inkscape-0.48.0
hivolt@hivolt-laptop:~/Desktop/inkscape-0.48.0$ ./configure
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking how to create a pax tar archive... gnutar
checking for style of include used by make... GNU
checking for g++... no
checking for c++... no
checking for gpp... no
checking for aCC... no
checking for CC... no
checking for cxx... no
checking for cc++... no
checking for cl.exe... no
checking for FCC... no
checking for KCC... no
checking for RCC... no
checking for xlC_r... no
checking for xlC... no
checking whether the C++ compiler works... no
configure: error: in `/home/hivolt/Desktop/inkscape-0.48.0':
configure: error: C++ compiler cannot create executables
See `config.log' for more details.

This is the config.log

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by inkscape configure 0.48.0, which was
generated by GNU Autoconf 2.65. Invocation command line was

  $ ./configure

## --------- ##
## Platform. ##
## --------- ##

hostname = hivolt-laptop
uname -m = i686
uname -r = 2.6.31-22-generic
uname -s = Linux
uname -v = #65-Ubuntu SMP Thu Sep 16 15:48:58 UTC 2010

/usr/bin/uname -p = unknown
/bin/uname -X = unknown

/bin/arch = unknown
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown

PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /sbin
PATH: /bin
PATH: /usr/games

## ----------- ##
## Core tests. ##
## ----------- ##

configure:2573: checking build system type
configure:2587: result: i686-pc-linux-gnu
configure:2607: checking host system type
configure:2620: result: i686-pc-linux-gnu
configure:2657: checking for a BSD-compatible install
configure:2725: result: /usr/bin/install -c
configure:2736: checking whether build environment is sane
configure:2786: result: yes
configure:2927: checking for a thread-safe mkdir -p
configure:2966: result: /bin/mkdir -p
configure:2979: checking for gawk
configure:3009: result: no
configure:2979: checking for mawk
configure:2995: found /usr/bin/mawk
configure:3006: result: mawk
configure:3017: checking whether make sets $(MAKE)
configure:3039: result: yes
configure:3114: checking how to create a pax tar archive
configure:3127: tar --version
tar (GNU tar) 1.22
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>.
This is free software: y...

su_v (suv-lp) wrote :

Please keep the issues separate - I didn't mean to tell you to download and compile Inkscape 0.48 just to get an updated version of a single extension script file, even more so as it is unclear what the actual cause of your problem is.

When exporting your SVG file to XCF using Inkscape 0.47 (and Python 2.6.2) on Mac OS X 10.5.8 I get the same deprecation warning but the XCF file is saved nevertheless. It is however empty, because all the drawing content is outside the page margins.

If I resize the page to the drawing contents the file exports to XCF as expected (attached file was exported with Inskcape 0.47).

It seems your issue is with the installation or system configuration and not with a specific Inkscape version.

Jeff Hack (happyzapp-gmail) wrote :

Well thanks for you reply. I am using Ubuntu Karmic. I have put the
graphic within the boundaries and same thing happens. I fetched the
program from the repositories and the program self installed. Version 0.47.

I did as you suggested. Resized page. Happens on all .svg files. Still this:

/usr/share/inkscape/extensions/gimp_xcf.py:98: DeprecationWarning:
os.popen3 is deprecated. Use the subprocess module.
  _,f,err = os.popen3(command,'r')
Traceback (most recent call last):
  File "/usr/share/inkscape/extensions/gimp_xcf.py", line 173, in <module>
    e.affect()
  File "/usr/share/inkscape/extensions/inkex.py", line 207, in affect
    self.effect()
  File "/usr/share/inkscape/extensions/gimp_xcf.py", line 167, in effect
    x = open(xcf, 'r')
IOError: [Errno 2] No such file or directory:
'/tmp/tmp2oMHQp/CleanVoltLogoBC.xcf'

Not looking to irritate you. Just looking for a solution.

Regards,
Frank Hack

~suv wrote:
> Please keep the issues separate - I didn't mean to tell you to download
> and compile Inkscape 0.48 just to get an updated version of a single
> extension script file, even more so as it is unclear what the actual
> cause of your problem is.
>
> When exporting your SVG file to XCF using Inkscape 0.47 (and Python
> 2.6.2) on Mac OS X 10.5.8 I get the same deprecation warning but the XCF
> file is saved nevertheless. It is however empty, because all the drawing
> content is outside the page margins.
>
> If I resize the page to the drawing contents the file exports to XCF as
> expected (attached file was exported with Inskcape 0.47).
>
> It seems your issue is with the installation or system configuration and
> not with a specific Inkscape version.
>
> ** Attachment added: "642417-CleanVoltLogoBC-047-resized-page.xcf"
> https://bugs.launchpad.net/inkscape/+bug/642417/+attachment/1609081/+files/642417-CleanVoltLogoBC-047-resized-page.xcf
>
>

su_v (suv-lp) wrote :

Do you have a file 'junk_from_gimp.txt' in '/tmp/tmp2oMHQp/', and any PNG files in the same tmp directory which reported back when the extension fails?

Alvin Penner (apenner) wrote :

    Running Windows XP and Inkscape 0.48. I am unable to successfully run this extension because I do not have gimp installed. However, if I force it to run anyways by removing the 'gimp' dependency from the .inx file, then I get the message below, which is similar to the original reported error.
    If I navigate to the directory shown in the error message, I find it contains 2 files: One file is a .PNG file which is a screen shot of my .svg image. The other file is called junk_from_gimp.txt, and contains the error message:

'gimp' is not recognized as an internal or external command, operable program or batch file.

- could you check your directory shown in your error message to see if it contains a similar error message?
- when you go into DOS or CLI and type in 'gimp' from any directory, does gimp run?

-- meesage attached -----------------------------------

Traceback (most recent call last): File "gimp_xcf.py", line 185, in <module> e.affect() File "D:\Program Files\Inkscape\share\extensions\inkex.py", line 215, in affect self.effect() File "gimp_xcf.py", line 179, in effect x = open(xcf, 'r')IOError: [Errno 2] No such file or directory: 'c:\\docume~1\\alvinp~1\\locals~1\\temp\\tmp0aoqjx\\New docume.xcf'

Alvin Penner (apenner) wrote :

oops, I was too late by one minute, slow typer...

Jeff Hack (happyzapp-gmail) wrote :

Yes, the

'junk_from_gimp.txt'

file exists.
No 'png' files in this directory.

Regards,
Frank Hack

~suv wrote:
> Do you have a file 'junk_from_gimp.txt' in '/tmp/tmp2oMHQp/', and any
> PNG files in the same tmp directory which reported back when the
> extension fails?
>
>

Jeff Hack (happyzapp-gmail) wrote :

Here is the file. The file is also in 'temp_Oh3o'.

Regards.

Frank Hack

~suv wrote:
> Do you have a file 'junk_from_gimp.txt' in '/tmp/tmp2oMHQp/', and any
> PNG files in the same tmp directory which reported back when the
> extension fails?
>
>

su_v (suv-lp) wrote :

The relevant line from the log (and confirmed by the missing PNG file in the directory):

Error: Procedure execution of file-png-load failed: Could not open '/tmp/tmp2oMHQp/layer1.png' for reading: No such file or directory

i.e. the script apparently fails to create the PNG file, even before it calls GIMP...

Source of the script in Inkscape 0.47:
<http://bazaar.launchpad.net/~inkscape.dev/inkscape/RELEASE_0_47_BRANCH/annotate/head%3A/share/extensions/gimp_xcf.py>

Jeff Hack (happyzapp-gmail) wrote :

OK. I am not a programmer but understand the terminology from PLC
programming and HTML/CSS. Now at a loss as how to rectify this. Any
suggestions?

Regards,

Frank Hack

~suv wrote:
> The relevant line from the log (and confirmed by the missing PNG file in
> the directory):
>
> Error: Procedure execution of file-png-load failed: Could not open
> '/tmp/tmp2oMHQp/layer1.png' for reading: No such file or directory
>
> i.e. the script apparently fails to create the PNG file, even before it
> calls GIMP...
>
> Source of the script in Inkscape 0.47:
> <http://bazaar.launchpad.net/~inkscape.dev/inkscape/RELEASE_0_47_BRANCH/annotate/head%3A/share/extensions/gimp_xcf.py>
>
>

jazzynico (jazzynico) wrote :

The PNG are created by Inkscape, in command line mode (see line 97).
Could you please try the following steps?
1. Open a console.
2. Change dir to the location of your file
3. Run # inkscape -i layer1 -j --export-area-page -e test.png CleanVoltLogoBC.svg

Everything is ok if test.png is created in the working directory.

Jeff Hack (happyzapp-gmail) wrote :

Yes, the test.png appears. When you say everything is OK, do you mean
Inkscape is OK? Once again, I cannot save it as a .xcf. Any ideas?
Thank you for your reply.

Regards,
Frank Hack

JazzyNico wrote:
> The PNG are created by Inkscape, in command line mode (see line 97).
> Could you please try the following steps?
> 1. Open a console.
> 2. Change dir to the location of your file
> 3. Run # inkscape -i layer1 -j --export-area-page -e test.png CleanVoltLogoBC.svg
>
> Everything is ok if test.png is created in the working directory.
>
>

jazzynico (jazzynico) wrote :

> When you say everything is OK, do you mean Inkscape is OK?

The command you have tested is the one the extension uses in order to export your PNGs. Therefore if it works from the command line, it only means that Inkscape is in your path variable (which is not really a surprise since /usr/bin and /usr/local/bin are both almost always in the user path), and that it accepts the arguments used by the extension. Except if the arguments are not exactly the same...

jazzynico (jazzynico) wrote :

Attached is a modified version of the current dev extension (there are new options and some fixes not released yet...) that outputs the command used to create the PNGs. Could you please copy the inx and py files in your /usr/share/inkscape/extensions/ folder (you need to use sudo, and please backup the old files) and give copy the message here?

Alex Valavanis (valavanisalex) wrote :

In Inkscape_0.48.0-1ubuntu1:

Traceback (most recent call last):
  File "gimp_xcf.py", line 185, in <module>
    e.affect()
  File "/usr/share/inkscape/extensions/inkex.py", line 215, in affect
    self.effect()
  File "gimp_xcf.py", line 179, in effect
    x = open(xcf, 'r')
IOError: [Errno 2] No such file or directory: '/tmp/tmpg71Ahh/New docume.xcf'

Changed in inkscape:
status: New → Confirmed
Changed in inkscape (Ubuntu):
status: New → Confirmed
Alex Valavanis (valavanisalex) wrote :

Using inkscape_0.48.0-1ubuntu1, patched with new extension version from comment #15:

Traceback (most recent call last):
  File "gimp_xcf.py", line 219, in <module>
    e.affect()
  File "/usr/share/inkscape/extensions/inkex.py", line 215, in affect
    self.effect()
  File "gimp_xcf.py", line 207, in effect
    x = open(xcf, 'rb')
IOError: [Errno 2] No such file or directory: '/tmp/tmpiDxIi1/New docume.xcf'

su_v (suv-lp) wrote :

@Alex:
1) Can you attach the 'junk_from_gimp.txt' file as described in earlier comments?

2) Are there any PNG files in the same tmp directory where you found the 'junk_from_gimp.txt' file? There ought to be one for each layer (if the script didn't execute successfully).

3) It's odd - if you really used the patched version from comment #15, you should get the full commandline used to export each layer to PNG in the feedback of the script. It almost seems like the complete loop to actually export the SVG content isn't executed (after line 108).

Jeff Hack (happyzapp-gmail) wrote :

  Thank you for the replies but I am at a loss as what to do with the
info you have sent me. (two previous emails)

Regards.

On 10-09-28 08:15 PM, ~suv wrote:
> @Alex:
> 1) Can you attach the 'junk_from_gimp.txt' file as described in earlier comments?
>
> 2) Are there any PNG files in the same tmp directory where you found the
> 'junk_from_gimp.txt' file? There ought to be one for each layer (if the
> script didn't execute successfully).
>
> 3) It's odd - if you really used the patched version from comment #15,
> you should get the full commandline used to export each layer to PNG in
> the feedback of the script. It almost seems like the complete loop to
> actually export the SVG content isn't executed (after line 108).
>

Alex Valavanis (valavanisalex) wrote :

junk_from_gimp.txt attached. No PNGs in the tmp folder

@Jeff - Don't worry about the last couple of emails. Launchpad automatically copies you in to any discussions about a bug you reported, even if the message isn't directly addressed to you.

jazzynico (jazzynico) wrote :

@Jeff - Could you please try to replace the gimp_xcf.py file (save it first!) in /usr/share/inkscape/extensions/ with the one downloaded here: http://bazaar.launchpad.net/~inkscape.dev/inkscape/RELEASE_0_48_BRANCH/annotate/head%3A/share/extensions/gimp_xcf.py
Lots of bugs have been fixed recently (and maybe your one!).

Changed in inkscape (Ubuntu):
importance: Undecided → Low
Changed in inkscape:
importance: Undecided → Medium
status: Confirmed → Incomplete
Changed in inkscape (Ubuntu):
status: Confirmed → Incomplete
Jeff Hack (happyzapp-gmail) wrote :

Finally got around to this. Seems to be saving as xcf file fine complete
with preserving layers.

My many thanks to all whom gave me assistance in this. I greatly
appreciate your efforts.

Now I have two great graphic programs to work with.

Regards,
Jeff

On 10-10-01 08:20 AM, JazzyNico wrote:
> @Jeff - Could you please try to replace the gimp_xcf.py file (save it first!) in /usr/share/inkscape/extensions/ with the one downloaded here: http://bazaar.launchpad.net/~inkscape.dev/inkscape/RELEASE_0_48_BRANCH/annotate/head%3A/share/extensions/gimp_xcf.py
> Lots of bugs have been fixed recently (and maybe your one!).
>

Alex Valavanis (valavanisalex) wrote :

Hi Jeff, Thanks for the feedback.

@JazzyNico - Based on the last comment, I'll mark this as being fixed in 0.48.1

Changed in inkscape:
status: Incomplete → Fix Committed
milestone: none → 0.48.1
Changed in inkscape (Ubuntu):
status: Incomplete → Triaged
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package inkscape - 0.48.1-0ubuntu1

---------------
inkscape (0.48.1-0ubuntu1) natty; urgency=low

  * New upstream version (LP: #710619). Fixes several Ubuntu bugs:
    - Node editing causes segmentation fault (LP: #544599)
    - Cursor position markers are not cleared from rulers (LP: #627134)
    - Crashes when opening document properties (LP: #658055)
    - Export to XCF error with default template (LP: #485032)
    - Editing a connector in a transformed group returns it to original
      position (LP: #533897)
    - Ungrouping objects changes position of arrow lines (LP: #552289)
    - Will not save XCF file (LP: #642417)
    - XCF export fails when exporting from unsaved document (LP: #650890)
  * Drop all patches: Applied upstream
  * debian/rules: Disable chmod on debian/patches/* in clean rule (no patches used)
 -- Alexander Valavanis <email address hidden> Tue, 01 Feb 2011 12:53:34 +0000

Changed in inkscape (Ubuntu):
status: Triaged → Fix Released
jazzynico (jazzynico) on 2011-03-05
Changed in inkscape:
status: Fix Committed → Fix Released
paul thomas (dt01pqt-pt) wrote :
Download full text (111.1 KiB)

May be same error but this time in Inkscape 0.48.1 r9760 Linux Mint 9 Isadora

It appear to be linked with the number of layers or size. reduce the number of layers/group nodes and it will save.

Original SVG:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->

<svg
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:cc="http://creativecommons.org/ns#"
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:svg="http://www.w3.org/2000/svg"
   xmlns="http://www.w3.org/2000/svg"
   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
   id="svg2"
   height="400"
   width="600"
   version="1.1"
   inkscape:version="0.48.1 r9760"
   sodipodi:docname="footwork.svg">
  <sodipodi:namedview
     pagecolor="#ffffff"
     bordercolor="#666666"
     borderopacity="1"
     objecttolerance="10"
     gridtolerance="10"
     guidetolerance="10"
     inkscape:pageopacity="0"
     inkscape:pageshadow="2"
     inkscape:window-width="640"
     inkscape:window-height="480"
     id="namedview105"
     showgrid="false"
     inkscape:zoom="0.7975"
     inkscape:cx="300"
     inkscape:cy="200"
     inkscape:window-x="0"
     inkscape:window-y="1"
     inkscape:window-maximized="0"
     inkscape:current-layer="layer2" />
  <metadata
     id="metadata7">
    <rdf:RDF>
      <cc:Work
         rdf:about="">
        <dc:format>image/svg+xml</dc:format>
        <dc:type
           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
        <dc:title />
      </cc:Work>
    </rdf:RDF>
  </metadata>
  <g
     id="f0"
     inkscape:label="f0"
     inkscape:groupmode="layer"
     transform="translate(-133.29978,105.86174)">
    <path
       id="rect2852"
       d="m0,0,600.82,0,0,400h-600.82v-400z"
       fill-rule="evenodd"
       transform="translate(133.29978,-105.86174)"
       fill="#dcdcdc" />
    <path
       id="path2830"
       fill="#000"
       d="m354.88,140.49c-3.267-0.83121-6.3396-2.4967-7.5931-6.6799s-0.54505-12.776-0.31553-13.902c0.22949-1.1263,1.7315-12.578,1.7497-14.097,0.0182-1.5194-0.0361-3.8559-0.0897-4.5924-0.0536-0.73648,0.47288-5.6777,0.44965-7.664-0.0232-1.9863,0.19048-7.5351,0.31324-9.3344,0.12279-1.7992,0.2541-3.6346,1.1215-6.3235,0.86744-2.6889,2.6385-4.2108,2.9076-5.023,0.26913-0.81218,0.0553-2.9581,0.0909-3.7495,0.0357-0.79146,0.4487-2.3694,0.9838-3.4993,0.53512-1.1299,1.1152-1.4873,1.7125-1.9168,0.59724-0.42948,0.69327-0.6733,1.3612-0.43841,0.66794,0.23487,1.3616,0.36164,1.7018,1.0138,0.34023,0.65223,0.57907,1.0899,0.57907,1.0899s-0.0554-0.88926,0.0917-2.1495c0.14701-1.2602,1.0049-2.4658,1.6364-3.0395s1.232-1.4976,1.9684-1.5512c0.73647-0.0536,0.82573-0.10853,1.322,0.0474,0.49622,0.15604,0.92391,0.60045,0.92391,0.60045s-0.24598-1.0488,0.0489-1.9692c0.29484-0.92034,0.89031-1.5026,1.4618-1.8239,0.57154-0.3213,1.217-0.47269,1.9106-0.34597,0.69366,0.12664,1.2656,0.60543,1.5112,0.85425,0.24561,0.24883,0.51195,0.73111,0.51195,0.73111s-0.55836-0.8564-0.35276-1.7218c0.20561-0.86536,1.1423-2.2427,1.6521-2.4644,0.50979-0.2217,2.2455-0.15212,2.7057-0.005,0.46015,0.14746,1.3755,0.78392,1.6608,1.34...

paul thomas (dt01pqt-pt) wrote :

Ok the problem was the group id f11 was missing attributes:

     inkscape:label="f11"
     inkscape:groupmode="layer"
     transform="translate(-133.29978,105.86174)"

and had a _space_ in id.

Suggestion check ids for invalid

paul thomas (dt01pqt-pt) wrote :

other suggestion option to use label names as xcf layer names.

jazzynico (jazzynico) wrote :

> and had a _space_ in id.
Confirmed, space in id breaks xcf export (not missing inkscape:label).

> other suggestion option to use label names as xcf layer names.
Inkscape 0.48.2 and trunk now use the layer label and if it doesn't exist, falls back to the id.

jazzynico (jazzynico) wrote :

Space character issue now in a separate report (Bug #821435, Gimp XCF export fails when layer id contains a space character).

I've just had a similar problem with saving as .xcf. From the junk_from_gimp.txt file in /tmp/tmpwudXWH/ the problem stems from this png file which doesn't seem to get created:

(#<error PROCEDURE 134> ("Procedure execution of file-png-load failed: Could not open '/tmp/tmpwudXWH/text4233.png' for reading: No such file or directory"))

This corresponds to an empty text tag in XML that Inkscape created. I found this at the very end of my svg file:

  <text
     xml:space="preserve"
     style="font-size:40px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Droid Sans;-inkscape-font-specification:Droid Sans Bold"
     x="252.5"
     y="62.890442"
     id="text4233"
     sodipodi:linespacing="125%"><tspan
       sodipodi:role="line"
       id="tspan4235"
       x="252.5"
       y="62.890442" /></text>

Using a text editor I removed that snippet from the XML and I can now save as .xcf without problem.

What's annoying is that Inkscape (version 0.48.0 r9654) created this text object that I could neither see nor select. I created this svg document in Inkscape. At some point my document did have some text in it, but long before saving I had deleted it. Since Inkscape had no problem exporting other similar documents as .xcf, I tried methodically deconstructing this document eliminating layers and objects until I had nothing left, and even then saving as .xcf would fail. So the bug is really that Inkscape left this empty <text> tag which I couldn't select using "Select All in All Layers".

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers