[mod_python] mpservlets:No module named index

Brian Ray bray at sent.com
Fri Sep 17 17:06:12 EDT 2004

hi again,

I am getting closer to getting my first time mod_python install  
working. The following code works:


# mptest.py
def say(req, what="NOTHING"):
     return "I am saying %s" % what

So, now I am trying to install mpservlets-1.1.5. I do get a couple  
compile warnings, 'package init file '__init__.py' not found (or not a  
regular file)'. However, everything after install_lib compiles fine.

When I copy the mpservlet tutorial into my webroot and set my  
httpd.conf to this:

LoadModule python_module modules/mod_python.so

<Directory  /var/www/tutorial>
    SetHandler python-program
    PythonHandler mod_python.publisher
    PythonDebug on


and try to access the page http://localhost/tutorial/ I continually get:

Mod_python error: "PythonHandler mod_python.publisher"

Traceback (most recent call last):

python2.3/site-packages/mod_python/apache.py", line 299, in  
     result = object(req)

python2.3/site-packages/mod_python/publisher.py", line 98, in handler

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

ImportError: No module named index

I also tried http://localhost/tutorial/index.mps. Any help, please?

The first script still runs when placed in this directory.

BTW, I did see an earlier post with the same error message, however the  
thread was resolved and the person was posting said they could take it  
from there:   

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 2091 bytes
Desc: not available
Url : http://modpython.org/pipermail/mod_python/attachments/20040917/644517f6/attachment.bin

More information about the Mod_python mailing list