由於Python的urllib模塊太慢,我在我的網站中使用了用JPype包裝的Java代碼。當我使用Django Web服務器測試我的網站時,沒有任何問題。但是,當我將Web服務器切換到apache2 + mod_python時,發生以下錯誤。我GOOGLE了很多次,但找不到答案。有什麼解決方案的錯誤?使用mod_python運行jpype的問題
MOD_PYTHON ERROR
ProcessId: 4831
Interpreter: 'localhost'
ServerName: 'localhost'
DocumentRoot: '/home/www/mysite'
URI: '/javamodule.py/'
Location: '/'
Directory: None
Filename: '/home/www/mysite/javamodule.py'
PathInfo: '/'
Phase: 'PythonHandler'
Handler: 'django.core.handlers.modpython'
Traceback (most recent call last):
File "/usr/lib/python2.6/dist-packages/mod_python/importer.py", line 1537, in HandlerDispatch
default=default_handler, arg=req, silent=hlist.silent)
File "/usr/lib/python2.6/dist-packages/mod_python/importer.py", line 1229, in _process_target
result = _execute_target(config, req, object, arg)
File "/usr/lib/python2.6/dist-packages/mod_python/importer.py", line 1128, in _execute_target
result = object(arg)
File "/usr/lib/pymodules/python2.6/django/core/handlers/modpython.py", line 228, in handler
return ModPythonHandler()(req)
File "/usr/lib/pymodules/python2.6/django/core/handlers/modpython.py", line 183, in __call__
os.environ.update(req.subprocess_env)
File "/usr/lib/python2.6/os.py", line 486, in update
self[k] = dict[k]
File "/usr/lib/python2.6/os.py", line 471, in __setitem__
putenv(key, item)
@ user433498選項:你能否提供完整的回溯。這看起來不像是一個完整的回溯。 – pyfunc 2010-10-13 07:46:10