Export to Gimp XCF error when using a default template

Bug #485032 reported by jazzynico
34
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Low
jazzynico
inkscape (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

I've noticed an error when saving a default template as xcf without resizing it. In this case, the export script returns this error message:

Traceback (most recent call last):
  File "/usr/share/inkscape/extensions/gimp_xcf.py", line 185, 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 44, in effect
    pageHeight = int(self.xpathSingle('/svg:svg/@height').split('.')[0])
ValueError: invalid literal for int() with base 10: '297mm'

After resizing the page with Document properties>Fit page to selection, the size unit is removed from Height and Width attributes and everything works well.

jazzynico (jazzynico)
tags: added: extensions-plugins xcf
jazzynico (jazzynico)
Changed in inkscape:
milestone: 0.48 → 0.49
assignee: nobody → JazzyNico (jazzynico)
tags: added: exporting
removed: extensions-plugins
Revision history for this message
su_v (suv-lp) wrote :

Reproduced with Inkscape 0.48+devel r9686 on OS X 10.5.8

Changed in inkscape:
status: New → Confirmed
Changed in inkscape (Ubuntu):
status: New → Confirmed
jazzynico (jazzynico)
Changed in inkscape:
status: Confirmed → In Progress
Revision history for this message
jazzynico (jazzynico) wrote :

Fix committed in the trunk, revision 9694.
Units in Height and Width attributes are now converted to pixels before the file is exported to XCF.

Please test!

Changed in inkscape:
status: In Progress → Fix Committed
Revision history for this message
su_v (suv-lp) wrote :

Fix confirmed with Inkscape 0.48+devel r9695 on OS X 10.5.8
(tested with template default_mm and default_pt)

Revision history for this message
jazzynico (jazzynico) wrote :

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

Changed in inkscape:
milestone: 0.49 → 0.48.1
Revision history for this message
Alex Valavanis (valavanisalex) wrote :

Added upstream patch for testing with Ubuntu

Changed in inkscape (Ubuntu):
status: Confirmed → In Progress
assignee: nobody → Alex Valavanis (valavanisalex)
Revision history for this message
Alex Valavanis (valavanisalex) wrote :
tags: added: patch-accepted-upstream
Revision history for this message
Alex Valavanis (valavanisalex) wrote :

dpatch attached for backport testing in Ubuntu package

Revision history for this message
Alex Valavanis (valavanisalex) wrote :

Weird... I just patched gimp_xcf.py and I get the following:

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

Am I missing anything from the earlier 0.48.1 changes since the 0.48.0 release?

Revision history for this message
su_v (suv-lp) wrote :

@Alex - your error message looks like the one in bug #642417 “Will not save .xcf file.” (reason why export to XCF fails on Ubuntu not yet known)... Maybe you can test with the attached version of the extension there to get some more debugging messages?

Revision history for this message
Alex Valavanis (valavanisalex) wrote :

Using the new versions from comment #15 in bug #642417:

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'

Revision history for this message
Alex Valavanis (valavanisalex) wrote :

OK, let's keep the issues separate. Actually, I find that I can't reproduce this bug using inkscape_0.48.0-1ubuntu1 (with or without patches) because bug #642417 occurs instead!

I can't effectively test this until bug #642417 is fixed so I will unassign myself from the backport job for the moment

Changed in inkscape (Ubuntu):
status: In Progress → Confirmed
assignee: Alex Valavanis (valavanisalex) → nobody
Changed in inkscape (Ubuntu):
importance: Undecided → Low
status: Confirmed → Triaged
Revision history for this message
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)
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.