Python hangs on
lxml.etree.XMLSchema(tree)
when I use it on apache server + mod_wsgi (Windows)
When I use Django dev server - all works fine
if you know about other nice XML validation solution against XSD, tell me pls
Update:
I'm using soaplib, which uses lxml
logger.debug("building schema...") self.schema = etree.XMLSchema(etree.parse(f)) logger.debug("schema %r built, cleaning up..." % self.schema)
I see "building schema..." in apache logs, but I don't see "schema %r built, cleaning up..."
Update 2: I built lxml 2.3 with MSVS 2010 visual C++; afterwards it crashes on this line
self.schema = etree.XMLSchema(etree.parse(f))with Unhandled exception at 0x7c919af2 in httpd.exe: 0xC0000005: Access violation writing location 0x00000010.
The work around that I used, is to set:
WSGIApplicationGroup %{GLOBAL}
More details can be found here.
I had the same problem (lxml 2.2.6, mod_wsgi 3.2). A work around for this is to pass a file or filename to the constructor: XMLSchema(file=).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With