[mod_python] error with test template system

David Bear David.Bear at asu.edu
Fri May 12 19:44:12 EDT 2006


On Sat, May 13, 2006 at 09:08:05AM +1000, Graham Dumpleton wrote:
> 
> On 13/05/2006, at 7:00 AM, David Bear wrote:
> 
> >I downloaded the sample template system from
> >http://www.modpython.org/examples/
> >
> >and placed it in a directory where publisher was set to be the .py
> >handler.
> >
> >However, when I open the sample index.py file, modpython returns an
> >error that there is no module named index. I am using modpython 3.1.3
> >(rpm packaged by suse) and apache 2.0.53.
> >
> >I know modpython is handling the request since I get a regular python
> >traceback when viewing the page through my web browser.
> >
> >Is there something simple that I have missed?
> 
> It will help if you send the exact text of the error with at least  
> the few most
> inner frames in the traceback. Also send the Apache configuration  
> snippet
> (not whole configuration) that you have used to enable mod_python for
> the example. Also indicate whether mod_python is used by anyone else
> of the server and whether the PythonPath directive has been set anywhere
> at all in the Apache configuration. Finally, before you tried this  
> example,
> did you try your own hello world example first.

yes. I did the hello world example. It works.

here's the traceback:
=================================
Mod_python error: "PythonHandler mod_python.publisher"

Traceback (most recent call last):

  File "/usr/lib64/python2.4/site-packages/mod_python/apache.py", line
299, in HandlerDispatch
    result = object(req)

  File "/usr/lib64/python2.4/site-packages/mod_python/publisher.py",
line 98, in handler
    path=[path])

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

ImportError: No module named index
==================================

Here's the configuration directive:

<Directory "/work/servers/www/htdocs/mp">
 AddHandler python-program .py
 PythonHandler mod_python.publisher
 PythonDebug On
</Directory>






> 
> I may not be around to answer this question in the short term as  
> going away
> for a little trip, but with this information someone else may be able  
> to help.
> 
> Graham

-- 
David Bear
phone: 	480-965-8257
fax: 	480-965-9189
College of Public Programs/ASU
Wilson Hall 232
Tempe, AZ 85287-0803
 "Beware the IP portfolio, everyone will be suspect of trespassing"


More information about the Mod_python mailing list