[Tutor] xml.sax error

Galen O'Neil goneil@scu.edu
08 Oct 2002 23:41:21 -0700


Dear Pythoners,
	I'm begginging to work with xml.sax,and my interpretation of the error
message I got would be that there is some sort of problem with the
module.  But I doubt that is the actual answer, as I was using on the
most basic functionality.  
	The code I'm running is almost directly from a HOWTO @
(http://pyxml.sourceforge.net/topics/howto/node12.html). Am I doing
something wrong?  Take a look and let me know what you see.
Thanks,
Galen

I run this code:

if __name__ == '__main__':
	#Create a parser
	parser = make_parser()
	
	#Create the handler
	dh = ReadAccounts(accounts)
	
	#Tell the parser to use my f'in handler yo
	parser.setContentHandler(dh)
	
	#open the file
	file = open("autokelvan.xml", "r")
	
	#Parse the input
	parser.parse(file)

I get this output:

>python -u xmlin.py
Traceback (most recent call last):
  File "xmlin.py", line 83, in ?
    parser.parse(file)
  File "/usr/lib/python2.2/site-packages/_xmlplus/sax/expatreader.py",
line 107, in parse
    self.reset()
  File "/usr/lib/python2.2/site-packages/_xmlplus/sax/expatreader.py",
line 236, in reset
    self._parser = expat.ParserCreate(intern = self._interning)
TypeError: 'intern' is an invalid keyword argument for this function
>Exit code: 256