expat error, help to debug?
Andreas Lobinger
newsreturns at biszumknie.de
Mon Aug 27 08:31:13 EDT 2007
Aloha,
Lawrence D'Oliveiro wrote:
> In message <fak7q4$ahn$1 at daniel-new.mch.sbs.de>, Andreas Lobinger wrote:
>>Anyone any idea where the error is produced?
> Do you want to try adding an EndElementHandler as well, just to get more
> information on where the error might be happening?
I want.
Adding an EndElement (left as an exercise to the user) handler the
output looks like this:
[42] scylla(scylla)> python pbxml.py s3.xml
s 7 book {}
x bookinfo bookinfo.xml None
s 9 chapter {u'id': u'technicalDescription'}
s 9 title {}
e title
s 10 para {}
e para
e chapter
e book
Traceback (most recent call last):
File "pbxml.py", line 29, in ?
fromxml(sys.argv[1])
File "pbxml.py", line 24, in fromxml
p.ParseFile(file(fname))
TypeError: an integer is required
which shows me that the error is caused after parsing the /book ...
BUT still within p.ParseFile (expat internal), so i can't look
into it.
The example here may be missleading. It was stripped down from
a quite large docbook.xml and there ther error happened in the
middle of the document, not at the end.
Wishing a happy day,
LOBI
More information about the Python-list
mailing list