XML Module problems

Martin von Loewis loewis at informatik.hu-berlin.de
Thu Feb 22 08:20:30 EST 2001


vonWedel at lfpt.rwth-aachen.de writes:

> First I tried Python on a Solaris machine, finding out that the
> python distribution installed does not contain _any_ XML parsers!?

It sure does include pyexpat - you have to have the expat library to
compile it, though. Of course, I don't know how you had installed
Python, so it is certainly possible that there is no XML parser in
your installation.

> Hence I chose to install PyXML -- it installs fine but running it
> gives me a segmentation fault in sax.make_parser(), so probably it
> doesn't succeed in loading the pyexpat.so module. Are there any
> binary versions of the module?

What version of PyXML? It works fine for me. If you need binary
releases: what version of Solaris?

>     self.feed(buffer)
>   File "d:\programme\python20\lib\xml\sax\expatreader.py", line 81, in 
> feed
>     self._parser.Parse(data, isFinal)
> TypeError: too many arguments; expected 1, got 2

That is a confusing traceback. It is not an error in the call to
Parse, but in the callback invoked from pyexpat. It would be good if
you could post your ContentHandler.

Regards,
Martin



More information about the Python-list mailing list