[lxml-dev] Help with an error message

Stefan Behnel stefan_ml at behnel.de
Wed May 14 18:16:26 CEST 2008


James William Pye wrote:
> It would be nice if lxml would be more explicit about the problem:
>
>  raise ValueError("NULL characters are not allowed in XML strings")
>
> That is: How I am supposed to derive that a NULL character was causing
> that
> AssertionError from the given string? (It wasn't until I found this
> message that I understood what I was doing wrong)

Ok, what about:

"All strings must be XML compatible: Unicode or ASCII, no NULL bytes"

?

Stefan



More information about the lxml-dev mailing list