[lxml-dev] Odd looking exception
Stefan Behnel
stefan_ml at behnel.de
Sat Aug 9 14:19:00 CEST 2008
Hi,
Sidnei da Silva wrote:
> I've just got an exception while upgrading to lxml 2.1.1. Still trying
> to find out if it's some backwards-incompatible change. But what
> triggered my attention is that the exception seems to have tried to
> display the line number from etree.c but failed:
>
> File "enfold\lxml\transform.pyo", line 429, in transform
> File "xslt.pxi", line 399, in lxml.etree.XSLT.__init__
> (src/lxml/lxml.etree.c:%u)
> XSLTParseError: Cannot parse stylesheet
>
> This is on Windows FWIW.
Might be worth it. Does anyone know if there is a platform dependent
difference regarding PyString_FromFormat("%u", some_int) ? At least the Python
docs say that the processing of the format string will stop short when it
encounters an unknown format, so that might be what's happening here.
I noticed that Cython actually uses a normal (signed) int here, so "%d" would
have been the correct format anyway. I changed that, so we'll see if that
makes it work for you in the next release (I don't think it's worth bothering
before that).
Stefan
More information about the lxml-dev
mailing list