Python hangs on lxml.etree.XMLSchema (tree) with apache + mod_wsgi

Python freezes

lxml.etree.XMLSchema (tree)

when I use it on apache + mod_wsgi server (Windows)

When I use Django dev server - everything works fine

if you know of another good solution for validating XML with XSD, please tell me

Update:

I use 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 the "build scheme ..." in apache logs, but I do not see the "schema% r built, clean up ..."

Update 2: I built lxml 2.3 with visual C ++ MSVS 2010; after that it crashes on this line

self.schema = etree.XMLSchema (etree.parse (f))
with an unhandled exception in 0x7c919af2 in httpd.exe: 0xC0000005: location where access violation was recorded 0x00000010.
+5
source share
3 answers

The work around that I used is to install:

WSGIApplicationGroup% {GLOBAL}

More detailed information can be found here.

+3
source

I had the same problem (lxml 2.2.6, mod_wsgi 3.2). The job for this is to pass the file or file name to the constructor: XMLSchema (file =).

+2
source

Linux. libxml2 lxml, , .

+1

All Articles