"Save as -> XCF" fails if SVG file has one or more empty layers

Bug #285558 reported by bugmenot on 2008-10-18
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Medium
jazzynico

Bug Description

To reproduce this bug simply create new empty layer and try to export to Gimp XCF file using "File -> Save As -> Gimp XCF with preserved layers" menu item. Exporter will return the following error:

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 172, 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/tmp6AtbtL/ink_ext_XXXXXX.svg9E.xcf'

I'm getting this in SVN. I have no empty layers.
This is, in my case, a regression. The same file saves as XCF without problems in 0.46
It worked fine in SVN a couple of months ago.
The resulting file is 0 bytes

Ubuntu 8.10 - 64 bit.

--
No matching node for expression: sodipodi:namedview/inkscape:grid[@type='xygrid' and (not(@units) or @units='px')]
Traceback (most recent call last):
  File "/usr/share/inkscape-devel/extensions/gimp_xcf.py", line 173, in <module>
    e.affect()
  File "/usr/share/inkscape-devel/extensions/inkex.py", line 175, in affect
    self.effect()
  File "/usr/share/inkscape-devel/extensions/gimp_xcf.py", line 167, in effect
    x = open(xcf, 'r')
IOError: [Errno 2] No such file or directory: '/tmp/tmpS4_X6n/ink_ext_XXXXXX.svgFW.xcf'
--

It's not the same bug (it has nothing to do with empty layers) but is pretty similar and it might be related.
Let me know it it isn't, so I open a new bug report.

Changed in inkscape:
importance: Undecided → Medium
status: New → Confirmed
Changed in inkscape:
assignee: nobody → acspike

As for Rev. 21019 this seems to be fixed. I tried all the described alternatives (empty layers, guides export on/off, grid export on/off). Everything worked fine.
I'm marking this as fixed. Please re-open if you still have the problem.

Tested on Ubuntu 8.10 - 64 bits / It didn't work some revisions ago.

Changed in inkscape:
status: Confirmed → Fix Released
Brian (kravitz-brian) wrote :

I'm getting this error on Ubuntu 9.10 using Inkscape 0.47pre4 r22446. I'm unable to save as XCF, and I have no empty layers.

Brian (kravitz-brian) wrote :

I'm using the 32-bit version of Ubuntu 9.10

su_v (suv-lp) wrote :

@Brian - I just filed a new report about this: bug #484016 “Export to GIMP XCF (*.xcf) fails with option '--export-area-canvas'”:
<https://bugs.launchpad.net/inkscape/+bug/484016>

AFAICS the export script fails because it is using a command line option for Inkscape that has been renamed. You can try and change it yourself in the 'gimp_xcf.py' on line 89:
 s/export-area-canvas/export-area-page/

su_v (suv-lp) on 2010-06-14
tags: added: exporting layers
removed: extensions
jazzynico (jazzynico) wrote :

Issue reproduced on Ubuntu 10.04, Inkscape 0.47.

Empty layers are not exported by Inkscape:

# inkscape -i emptylayer -j --export-area-page -e emptylayer.png testfile.svg
Returns:
** (inkscape:1760): WARNING **: Unable to determine a valid bounding box. Nothing exported.

and thus when script-fu tries to import them in an XCF file, it fails.

Changed in inkscape:
assignee: Aaron C Spike (acspike) → JazzyNico (jazzynico)
milestone: none → 0.49
status: Fix Released → Confirmed
jazzynico (jazzynico) on 2010-08-11
Changed in inkscape:
status: Confirmed → In Progress
jazzynico (jazzynico) wrote :

Fix committed in the trunk, revision 9699.

The script now test if a layer is empty, and skip it if it's the case.

The file is available on launchpad (http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/annotate/head%3A/share/extensions/gimp_xcf.py). To test the fix with 0.47 or 0.48, copy the downloaded file to the Inkscape share/extension folder.

Changed in inkscape:
status: In Progress → Fix Committed
jazzynico (jazzynico) wrote :

Fix backported to 0.48.x branch (revision 9660).

Changed in inkscape:
milestone: 0.49 → 0.48.1
jazzynico (jazzynico) on 2011-03-05
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers