_hashlib fails to load

<[email protected]>
Newsgroups gmane.comp.python.mod_python
Message-ID <91A251F08F46984C94837FBF14D98A161537D9@S-DC-EXM35.net1.cec.eu.int>
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

_______________________________________________
Mod_python mailing list
[email protected]
http://mailman.modpython.org/mailman/listinfo/mod_python
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.