LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   mod_python config error (http://www.linuxquestions.org/questions/programming-9/mod_python-config-error-312336/)

darthtux 04-12-2005 06:03 AM

mod_python config error
 
I am running Debian Sarge, Apache 2.0.53 and mod_python 3.1.3. I followed the directions from the mod_python documentation

http://www.modpython.org/live/curren...t-testing.html

and continue to get the following error:

<pre>
Mod_python error: "PythonHandler mptest"

Traceback (most recent call last):

File "/usr/lib/python2.3/site-packages/mod_python/apache.py", line 287, in HandlerDispatch
log=debug)

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

ImportError: No module named mptest
</pre>

Any suggestions?

pyhenry 05-21-2005 07:27 PM

I know this is an old thread, but I found it through google and would have appreciated some answer when I first found it :)

I had the same problem and realized that the name of the file (mptest.py) and the name of the handler (PythonHandler mptest) have to match.

I am certain this is not the only way because if it were you would need a line for every .py file you created. I will continue to learn and post a more detailed explanation if I can.


Henry Baxter


All times are GMT -5. The time now is 01:07 PM.