XML Module problems

Lars von Wedel vonWedel at lfpt.rwth-aachen.de
Thu Feb 22 09:43:58 EST 2001


Hello Martin,

> > 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.

As far as I know we installed a binary package from some site, don't
know
from where exactly, though. However, in xml/parsers there is expat.py
but no pyexpat.

> > 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?
It shows the same behavior for both 0.6.2 and 0.6.3. 'uname -a'
says 'SunOS kazul 5.7 Generic sun4m sparc'. I just tried to recompile
the package on a more recent machine (SOS 5.7, but type sun4u instead
of sun4m) and this one seems to work (on both machines!), I can create
an Expat after installing the package. Strange, but anyway.

> >     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.

Now, that's indeed confusing! With this hint I could quickly trace the
problem down.

Thanks for your quick help,
Lars




More information about the Python-list mailing list