export_gimp_palette.py crashed with AttributeError in checkStyle()

Bug #224675 reported by ambroise
8
Affects Status Importance Assigned to Milestone
inkscape (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: inkscape

Inkscape crash during recording a .gpl palette in usr/share/inskcape/palettes...

ProblemType: Crash
Architecture: i386
Date: Wed Apr 30 14:39:02 2008
DistroRelease: Ubuntu 8.04
ExecutablePath: /usr/share/inkscape/extensions/export_gimp_palette.py
InterpreterPath: /usr/bin/python2.5
Package: inkscape 0.46-0ubuntu2
PackageArchitecture: i386
ProcCmdline: python /usr/share/inkscape/extensions/export_gimp_palette.py /tmp/ink_ext_XXXXXXG7799T
ProcEnviron:
 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
 LANG=fr_FR.UTF-8
 SHELL=/bin/bash
PythonArgs: ['/usr/share/inkscape/extensions/export_gimp_palette.py', '/tmp/ink_ext_XXXXXXG7799T']
SourcePackage: inkscape
Title: export_gimp_palette.py crashed with AttributeError in checkStyle()
Uname: Linux 2.6.24-16-generic i686
UserGroups: adm admin audio cdrom dialout dip floppy lpadmin netdev plugdev powerdev sambashare scanner vboxusers video

Tags: apport-crash
Revision history for this message
ambroise (dambsfr) wrote :
Changed in inkscape:
importance: Undecided → Medium
Revision history for this message
PeterShinners (pete-shinners) wrote :

This looks like a plain error with this plugin. The error in question is in Python code calling "node.hasAttributes()" on an xml minidom node. This hasAttributes is not a part of Python's minidom, and not mentioned in the DOM level 1 documentation. http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html

An easy fix looks like to remove this line 27. The code would still ignore nodes without a "style" attribute, and should have no difference in behaviour. (If we assume hasAttributes() returned True if there were any attributes on the xml node?)

Revision history for this message
PeterShinners (pete-shinners) wrote :

Correction.

Python 2.5's xml minidom Element does have a hasAttributes() method. Perhaps the plugin is encountering a text node, which is not an xml element?

The call the plugin is making still seems unnecessary.

Revision history for this message
Bryce Harrington (bryce) wrote :

A pre-release of the upcoming Inkscape 0.47 is now available in Ubuntu
Karmic for testing. Because *so* much stuff has changed compared with
the version you reported your bug against, would you mind re-testing
this new version and see if this bug is now resolved?

Karmic Alpha CD ISO images are available at:

  http://cdimage.ubuntu.com/releases/karmic/

If you're not testing Karmic yet, there are .debs of this new Inkscape
for Jaunty, Hardy, and Intrepid here:

  https://launchpad.net/~inkscape.testers/+archive/ppa

You might find further bugs when testing this alpha release. If that is
the case, please file a NEW bug report here:

   https://edge.launchpad.net/inkscape/+filebug

Thanks ahead of time for your testing efforts, and enjoy the new Inkscape!

Changed in inkscape (Ubuntu):
status: New → Incomplete
Revision history for this message
PeterShinners (pete-shinners) wrote :

I am unable to recreate the problem with 0.47~pre0~0ubuntu1~9.04.

Revision history for this message
Bryce Harrington (bryce) wrote :

Thanks for letting us know the issue is resolved.

Changed in inkscape (Ubuntu):
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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