[mod_python] _hashlib fails to load

Roselinda.Ackermans at ec.europa.eu Roselinda.Ackermans at ec.europa.eu
Thu Apr 2 09:03:05 EDT 2009


Hi,
I just installed mod_python module (3.3.1) from blastwave, on Solaris 9, with Apache 2 and python 2.5.1
In httpd.conf :
<Directory /www/test>
AddHandler mod_python .py
PythonHandler ptest
PythonDebug On
</Directory>

ptest.py being a test script in /www/test

When I try http://myserver/test/ptest.py, I get these errors in error_log :
<...>
File "/opt/csw/lib/python/hashlib.py", line 133, in <module>
md5 = __get_builtin_constructor('md5')
File "/opt/csw/lib/python/hashlib.py", line 60, in __get_builtin_constructor
import _md5
ImportError: No module named _md5
[Mon Mar 23 15:27:29 2009] [error] get_interpreter: no interpreter callback foun
d.
[Mon Mar 23 15:27:29 2009] [error] [client 192.10.10.10] python_handler: Can't
get/create interpreter.

When I start python console, I can do "import hashlib" without error message. 
I put a few print statements around 'import _hashlib' in the hashlib.py file, and it seems indeed that 'import _hashlib' hits the exception when hashlib.py is loaded from within mod_python, but loads fine from within the python console.
I also printed the value of sys.path, and this is the same in both cases.
What could the problem then be ?


Best regards,
Linde Ackermans 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mm_cfg_has_not_been_edited_to_set_host_domains/pipermail/mod_python/attachments/20090402/20575318/attachment.html


More information about the Mod_python mailing list