[mod_python] ImportError: No module named mptest

Juan Hernandez alucard at kanux.com
Thu Jun 24 01:03:22 EDT 2004


Hi there again,

     Thanks for all the answers but, I bet that I still don't understand 
many things in this new module I'm trying to use, I'm, just a PHP 
programmer really looking into python and I know it rocks... Let me ask 
you guys a few questions before going further.

This one above  is the local domain where I want the mod_python to work
=====
NameVirtualHost 10.73.219.156

<VirtualHost 10.73.219.156>
    ServerName webmail.domain.com.ve
    ServerAlias www.domain.com.ve
    ServerAlias domain.com.ve
    DocumentRoot /home/webmail
    ErrorLog /var/log/apache/webmail.domain.com.ve-error_log
    CustomLog /var/log/apache/webmail.domain.com.ve-access_log combined
</VirtualHost>
=====

And, after all the documentation I read, this is how -as a apache 
module- I load it into that specific domain -let's mention that I'm 
using the setup before all the answers I got from the list-

=====

<Directory /home/webmail/python/>
AddHandler python-program .py
PythonHandler mptest
PythonDebug On
</Directory>
=====
There are some things that I dont understand here...
- PythonHandler mptest <<--- What is this? Some people tell me that I 
have to have it inside /home/webmail/python/, something like index.php 
or in this case, mptest.py?? or is it a function or some kind or value 
called from mod_python's includes or conf files? because I've read that 
this error is caused by some misspelled word in version 2.7.7 and I'm 
using 2.7.10 where i'ts supoused to be fixed.

=====

Mod_python error: "PythonHandler mptest"

Traceback (most recent call last):

  File "/usr/lib/python2.3/site-packages/mod_python/apache.py", line 181, in Dispatch
    module = import_module(module_name, _req)

  File "/usr/lib/python2.3/site-packages/mod_python/apache.py", line 332, in import_module
    f, p, d = imp.find_module(parts[i], path)


ImportError: No module named mptest

=====

PythonHandler mptest <<-- where does it come from? if it's a file... how 
come it's not in my system?

Thanks a lot for this help... I know how hard is to discuss stuff with 
newbies hehehe

Juan



More information about the Mod_python mailing list