You're right, Anders. But another problem just occured after modification.
The name of my project is devildictionary, and i've put the main directory in directory htdocs. The url " http://localhost/devildictionary" yields the following error message:

404 Not Found

The path '/devildictionary/' was not found.

Traceback (most recent call last):
File "/usr/lib/python2.4/site-packages/CherryPy-2.1.0_rc2-py2.4.egg/cherrypy/_cphttptools.py", line 271, in run
main()
File "/usr/lib/python2.4/site-packages/CherryPy- 2.1.0_rc2-py2.4.egg/cherrypy/_cphttptools.py", line 497, in main
page_handler, object_path, virtual_path = mapPathToObject(path)
File "/usr/lib/python2.4/site-packages/CherryPy-2.1.0_rc2-py2.4.egg/cherrypy/_cphttptools.py ", line 745, in mapPathToObject
raise cherrypy.NotFound(path)
NotFound: 404: The path '/devildictionary/' was not found.
BTW, instead of adding a .htaccess in the main directory of my project, i put the following directives into http.conf:
<Directory "/usr/local/apache2/htdocs/devildictionary">
        SetHandler mod_python
        PythonHandler mpcp
        PythonDebug On
        PythonOption cherrysetup devildictionary_start::mp_setup
</Directory>

The above url always gives me the listing of my project directory if i put a .htaccess file into the main directory.


On 12/16/05, anders pearson <[EMAIL PROTECTED]> wrote:
Angus Lee <[EMAIL PROTECTED]> writes:

>   File "/usr/lib/python2.4/site-packages/mpcp-1.2-py2.4.egg/mpcp.py",
> line 61, in setup
>     mod = __import__(modname, globals(), locals(), [fname])
>
> ImportError: No module named py

the sample config on the wiki says to put

   PythonOption cherrysetup $NAME_OF_YOUR_START_SCRIPT::mp_setup

do you have "myapp_start.py::mp_setup" or "myapp_start::mp_setup"?

it sounds like you have the former. you need the latter.

--
anders pearson : http://www.columbia.edu/~anders/
   C C N M T L : http://www.ccnmtl.columbia.edu/
        weblog : http://thraxil.org/





Reply via email to