Lonnie Princehouse wrote: > Hi all, > > I'm getting a seg fault when I try to use minidom to parse some XML > inside a wxPython app. > > I was wondering if someone else could run the simple code below on > Linux and, if it doesn't crash horribly, post which versions of > (Python, wxPython) they are using? I can't find other messages related > to this, so I suspect it is something broken with my installation. > I'm using Python 2.4.2 and wx 2.6.1.0. > > Incidentally, writing XML with minidom works fine, and this is all > happening in wxPython's main thread. > > > import wx > from xml.dom import minidom > > app = wx.PySimpleApp() > frame = wx.Frame(None, -1, "Hello World") > frame.Show(True) > button = wx.Button(frame, -1, "Click me") > > testxml = 'xml version="1.0" ?><foo></foo>' > > def click(event): > doc = minidom.parseString(testxml) # seg fault?! > print "Success!" > > frame.Bind(wx.EVT_BUTTON, click, button) > > app.MainLoop()
This sounds similar to a problem I reported a few months ago. This is the link. http://groups.google.com/group/comp.lang.python/browse_frm/thread/6fc1097d26083e43/5fbdf493f3c38942?q=&rnum=1&hl=en#5fbdf493f3c38942 In my case, it turned out to be a bug in the pyexpat module - it is known about, but for some reason difficult to fix, so it is still there. I found a workaround, which is documented in the above thread. HTH Frank Millman -- http://mail.python.org/mailman/listinfo/python-list