tag 296155 + fixed-upstream
thanks

Matt,

On Sat, Feb 19, 2005 at 09:56:36AM -0800, Matt Brubeck wrote:
> 
>   Traceback (most recent call last):
>     File "/usr/share/gramps/ReadXML.py", line 291, in loadData
>       parser.parse(xml_file)
>     File "/usr/share/gramps/GrampsParser.py", line 194, in parse
>       p = xml.parsers.expat.ParserCreate()
>     AttributeError: 'module' object has no attribute 'expat'

It seems that the expat module has changed things around a bit.
The following patch works for me and has been committed to the CVS.
The next upstream release (1.0.11) should have this correct.

James, would it be too much trouble to apply this and release another
deb for 1.0.10? This problem breaks gramps for all users with newer
expat module, which is all users of sid.

Thanks,
Alex

Index: src/GedcomInfo.py
===================================================================
RCS file: /cvsroot/gramps/gramps2/src/GedcomInfo.py,v
retrieving revision 1.7
retrieving revision 1.7.4.1
diff -u -r1.7 -r1.7.4.1
--- src/GedcomInfo.py   28 Jun 2003 17:35:00 -0000      1.7
+++ src/GedcomInfo.py   19 Feb 2005 00:06:21 -0000      1.7.4.1
@@ -50,7 +52,7 @@
 # XML parser
 #
 #-------------------------------------------------------------------------
-import xml.parsers.expat
+from xml.parsers.expat import ParserCreate
 
 class GedcomDescription:
     def __init__(self,name):
@@ -190,7 +192,7 @@
         self.current = None
 
     def parse(self,file):
-        p = xml.parsers.expat.ParserCreate()
+        p = ParserCreate()
         p.StartElementHandler = self.startElement
         p.ParseFile(file)
         
Index: src/GrampsParser.py
===================================================================
RCS file: /cvsroot/gramps/gramps2/src/Attic/GrampsParser.py,v
retrieving revision 1.23.2.3
retrieving revision 1.23.2.4
diff -u -r1.23.2.3 -r1.23.2.4
--- src/GrampsParser.py 19 May 2004 04:19:51 -0000      1.23.2.3
+++ src/GrampsParser.py 19 Feb 2005 00:06:21 -0000      1.23.2.4
@@ -27,7 +27,7 @@
 import string
 import Calendar
 import Utils
-import xml.parsers.expat
+from xml.parsers.expat import ParserCreate
     
 #-------------------------------------------------------------------------
 #
@@ -191,7 +191,7 @@
 
 
     def parse(self,file):
-        p = xml.parsers.expat.ParserCreate()
+        p = ParserCreate()
         p.StartElementHandler = self.startElement
         p.EndElementHandler = self.endElement
         p.CharacterDataHandler = self.characters




-- 
Alexander Roitman   http://ebner.neuroscience.umn.edu/people/alex.html
Dept. of Neuroscience, Lions Research Building
2001 6th Street SE, Minneapolis, MN  55455
Tel (612) 625-7566   FAX (612) 626-9201

Attachment: signature.asc
Description: Digital signature

Reply via email to