XCF export error ("'module' object has no attribute 'xml'")

Bug #189871 reported by agb
2
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Medium
Aaron C Spike

Bug Description

On saving I get error message.
Attached.
Windows XP
0.46 pre1

Revision history for this message
agb (agb-ukr) wrote :
Revision history for this message
Tom Davidson (tjd-mit) wrote :

The text of the attached error message (so that it is searchable):

File "share\extensions\gimp_xcf.py", line 97, in <module> e.affect()
File "C:\Program Files\Inkscape\share\extensions\inkex.py", line 154, in affect
self.effect()
File "share\extensions\gimp_xcf.py", line 29, in effect
node = inkex.xml.xpath.Evaluate('/svg',self.document)[0]
AttributeError: 'module' object has no attribute 'xml'

Revision history for this message
Tom Davidson (tjd-mit) wrote :

Confirmed on Linux (Fedora core 6), in SVN (rev 17256, Feb 6, 2008).

Revision history for this message
Tom Davidson (tjd-mit) wrote :

This would seem to be a recent regression...

Changed in inkscape:
assignee: nobody → acspike
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Aaron C Spike (acspike) wrote :

Wow. It appears this effect has never been converted to use lxml. We're relying on old pyxml APIs for XPath.

A quick grep through the share/extensions directory in my SVN checkout indicates that svg_and_media_zip_output.py shares this same problem with gimp_xcf.py. Both of these scripts need to be updated and there may be more. :-( The good news is that the updates are rather simple to do. The patterns of API changes can be found in the change logs for many of the other python extensions that have already been converted.

Revision history for this message
Tom Davidson (tjd-mit) wrote :

See bug 168533 for the 'save as compressed with media issue'--you are right aaron, it gives exactly the same error in both cases. I'm milestoning it not because it is critical that it be fixed by then, but because if it isn't fixed before 0.46, we should probably just disable these two options....

Changed in inkscape:
milestone: none → 0.46
Revision history for this message
Aaron C Spike (acspike) wrote :

I agree. Must be fixed for 0.46. I'll try to make it happen.

Revision history for this message
Aaron C Spike (acspike) wrote :

I've updated both scripts for lxml in svn. they are both still broken. the xcf script needs some attention to make it work with newer gimp. the zip script crashes inkscape on my machine (I'd like someone else to confirm this please).

Revision history for this message
Aaron C Spike (acspike) wrote :

crash should be fixed now as of 17422

Changed in inkscape:
status: Confirmed → Fix Committed
Revision history for this message
Bryce Harrington (bryce) wrote :

Thanks Aaron! So it sounds like they're all fixed except the xcf script? Could we simply drop the xcf script from the release, or do you think it's something that can be fixed up within a day or two?

Revision history for this message
Aaron C Spike (acspike) wrote :

no, I think the xcf script is fixed now too. works for me. keep in mind that it never worked on win32. (though it may be possible to fix that now if newer gimps have a console exe. I'm not really interested in making it work on win32 though. this was just a hack to fulfill the needs a few linux users expressed on irc.)

Tom Davidson (tjd-mit)
Changed in inkscape:
status: Fix Committed → Fix Released
Revision history for this message
Tom Davidson (tjd-mit) wrote :

Works well for me under Linux (fedora 8) in rev 17424, opening in gimp version 2.4.4. (Test file included linked image, simple shapes in 2 layers)

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

Other bug subscribers

Bug attachments

Remote bug watches

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