[lxml-dev] Error reporting not clear

Stefan Behnel stefan_ml at behnel.de
Tue May 6 18:14:51 CEST 2008


Hi,

F Wolff wrote:
> I had a bug report which I traced to an invalid XML file. The error
> message given by the parser was however not optimally useful. The file
> is available here (zipped):
> http://bugs.locamotion.org/attachment.cgi?id=132
>
> and a description of the problem here:
> http://bugs.locamotion.org/show_bug.cgi?id=384
>
> It might or might not be interesting to improve this error reporting, so
> I thought I'll mention it.

The error comes from libxml2 as is. You can check the error log to see if
that is the only error that the parser reports, or if there are other
errors that might be more important.

http://codespeak.net/lxml/api.html#error-handling-on-exceptions

If you feel that lxml selects the wrong message from the error log, please
provide a list of errors as example. The lxml version is also important in
this context, as there were improvements in the not so far history.

Stefan



More information about the lxml-dev mailing list