Python 卡在 lxml.etree.XMLSchema(tree) with apache + mod_wsgi

标签 python apache mod-wsgi lxml xml-validation

Python 挂起

lxml.etree.XMLSchema(tree)

当我在 apache 服务器 + mod_wsgi (Windows) 上使用它时

当我使用 Django 开发服务器时 - 一切正常

如果您知道其他针对 XSD 的不错的 XML 验证解决方案,请告诉我

更新:

我正在使用 soaplib,它使用 lxml

logger.debug("building schema...")
self.schema = etree.XMLSchema(etree.parse(f))

logger.debug("schema %r built, cleaning up..." % self.schema)

我在 Apache 日志中看到“构建架构...”,但我没有看到“架构 %r 已构建,正在清理...”

更新 2: 我用 MSVS 2010 Visual C++ 构建了 lxml 2.3;之后它在这条线上崩溃了

self.schema = etree.XMLSchema(etree.parse(f))
在 httpd.exe 的 0x7c919af2 处有未处理的异常:0xC0000005:访问冲突写入位置 0x00000010。

最佳答案

我使用的解决方法是设置:

WSGIApplicationGroup %{GLOBAL}

More details can be found here.

关于Python 卡在 lxml.etree.XMLSchema(tree) with apache + mod_wsgi,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5617599/

相关文章:

python - 为什么 nump.cov() 和 np.std() 计算的相关性与 np.corrcoef() 计算的结果不同

python - 将自定义格式化程序类与 Python 的 logging.config 模块一起使用

linux - 如何使用 ssh + 密码连接到 Aptana studio 3? (SFTP)

java - Lucene 4.3.0 的简单测试代码不起作用

django - 为什么我的 django/psql 站点如此缓慢?

django - 使用URL前缀("subdirectory"来运行Django)-应用可以运行,但是URL断开了吗?

python - 我想在另一个函数中使用一个函数的返回值,而无需再次运行该函数。 (Python)

python - Pandas df.corr - 跨多列的一个变量

WordPress http 到 https 重定向

python - Apache 中的配置错误