[mod_python] error with test template system

David Bear David.Bear at asu.edu
Mon May 15 12:08:50 EDT 2006


On Mon, May 15, 2006 at 06:33:46AM +1000, Graham Dumpleton wrote:
> 
> On 13/05/2006, at 9:44 AM, David Bear wrote:
> 
> >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/
> >>>
> >>>python
> >>>traceback when viewing the page through my web browser.
> >>>
> >>>Is there something simple that I have missed?
> >
> >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>
> 
> Are the files in the directory readable by others? The Apache server  
> generally
> runs as a special user, if that user doesn't have read access to the  
> directories
> and files, it will not be able to find the files.

boy do I feel stupid. That was it.

I change file perms to go+rx and now all works.



> 
> Also, do you have an appropriate Alias directive to map URL namespace to
> that actual directory, or does that directory lie under the document  
> root?
> What is the actual URL you are using?
> 
> 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