Package: pythoncad
Version: 0.1.33-2
Tags: patch

When attempting to save a CAD file:

Traceback (most recent call last):
   File
"/var/lib/python-support/python2.5/PythonCAD/Interface/Gtk/gtkmenus.py",
line 137, in file_open_cb
     imageio.load_image(_image, _handle)
   File "/var/lib/python-support/python2.5/PythonCAD/Generic/imageio.py",
line 2876, in load_image
     _doc = xml.dom.minidom.parse(filehandle)
   File "xml/dom/minidom.py", line 1913, in parse
   File "xml/dom/expatbuilder.py", line 928, in parse
   File "xml/dom/expatbuilder.py", line 207, in parseFile
 xml.parsers.expat.ExpatError: not well-formed (invalid token): line 1,
column 6
 Traceback (most recent call last):
   File
"/var/lib/python-support/python2.5/PythonCAD/Interface/Gtk/gtkmenus.py",
line 341, in file_save_as_cb
     _fname = gtkimage.getFilename()
 AttributeError: 'GTKImage' object has no attribute 'getFilename'

The manual fix is to edit:
/var/lib/python-support/python2.5/PythonCAD/Interface/Gtk/gtkmenus.py
In line 341 change:
    _fname = gtkimage.getFilename()
to:
    _fname = gtkimage.image.getFilename()
--- gtkmenus.py	2006-07-03 12:17:39.000000000 -0400
+++ gtkmenus_fixed.py	2007-04-21 14:48:11.000000000 -0400
@@ -338,7 +338,7 @@
 
 #------------------------------------------------------------
 def file_save_as_cb(menuitem, gtkimage):
-    _fname = gtkimage.getFilename()
+    _fname = gtkimage.image.getFilename()
     if _fname is None:
         _fname = gtkimage.getWindow().get_title()
     _get_filename_and_save(gtkimage, _fname)

Reply via email to