expat parsing error

kaklis at gmail.com kaklis at gmail.com
Tue Jun 1 10:00:46 EDT 2010


On Jun 1, 9:51 am, John Bokma <j... at castleamber.com> wrote:
> "kak... at gmail.com" <kak... at gmail.com> writes:
> > I got the following error
> > --- <exception caught here> ---
> >   File "/usr/lib/python2.6/site-packages/Twisted-10.0.0-py2.6-linux-
> > x86_64.egg/twisted/internet/selectreactor.py", line 146, in
> > _doReadOrWrite
> >     why = getattr(selectable, method)()
> >   File "/usr/lib/python2.6/site-packages/Twisted-10.0.0-py2.6-linux-
> > x86_64.egg/twisted/internet/tcp.py", line 460, in doRead
> >     return self.protocol.dataReceived(data)
> >   File "stdiodemo.py", line 419, in dataReceived
> >     p.Parse(line, 1)
> > xml.parsers.expat.ExpatError: syntax error: line 1, column 0
>
> > The XML Message is coming in the form of:
>
> > POST /test/pcp/Listener HTTP/1.1
>
> Does Expat get this line as well? If so, that's the reason why you get
> an error at line 1, column 0.
>
> --
> John Bokma                                                               j3b
>
> Hacking & Hiking in Mexico -  http://johnbokma.com/http://castleamber.com/- Perl & Python Development

Yes but how can i fix it, how to "ignore" the headers and parse only
the XML?
Thanks



More information about the Python-list mailing list