[mod_python] mod_python mptest.py works publisher not

Graham Dumpleton grahamd at dscpl.com.au
Wed Oct 12 22:12:25 EDT 2005


What is the actual URL you are using? What is the full pathname you are
using in the Directory directive and what is the full pathname of the
Python code file you are expecting to be loaded and executed? What
is the full code you have in that Python code file?

Do you get the same result if you include:

  Options -MultiViews

inside the Directory directive?

Did you try not using backslashes but use forward slashes for the
Directory directive as recommended by Jim on comp.lang.python.

BTW, if you do get it working, please tell us on the mailing list what
you had to do to get it working. That is a beta version and we need
the feedback on issues like this in case there is something that needs
to be fixed.

Graham

python_it at hotmail.com wrote ..
> I'm going to work with mod_python.
> 
> 
> I install mod_python 3.2.2b for python 2.4.
> 
> 
> If i test my install with
> mptest.py
> see this link:
> http://www.modpython.org/live/mod_python-3.2.2b/doc-html/modpython.html
> IT WORKS!
> 
> 
> But if i try this:
> 
> 
> <Directory "C:\.......">
> AddHandler mod_python .py
> PythonHandler mod_python.publisher
> PythonDebug On
> </Directory>
> 
> 
> http://www.modpython.org/live/mod_python-3.2.2b/doc-html/tut-pub.html
> 
> 
> It don't work!
> 
> 
> I Get the following message:
> 
> 
> Mod_python error: "PythonHandler mod_python.publisher"
> 
> 
> Traceback (most recent call last):
> 
> 
>   File "C:\Program
> Files\Python24\Lib\site-packages\mod_python\apache.py", line 299, in
> HandlerDispatch
>     result = object(req)
> 
> 
>   File "C:\Program
> Files\Python24\Lib\site-packages\mod_python\publisher.py", line 204, in
> handler
>     module = page_cache[req]
> 
> 
>   File "C:\Program
> Files\Python24\Lib\site-packages\mod_python\cache.py", line 77, in
> __getitem__
>     return self._checkitem(name)[2]
> 
> 
>   File "C:\Program
> Files\Python24\Lib\site-packages\mod_python\cache.py", line 119, in
> _checkitem
>     value = self.build(key, name, opened, entry)
> 
> 
>   File "C:\Program
> Files\Python24\Lib\site-packages\mod_python\publisher.py", line 77, in
> build
>     return ModuleCache.build(self, key, req, opened, entry)
> 
> 
>   File "C:\Program
> Files\Python24\Lib\site-packages\mod_python\cache.py", line 367, in
> build
>     module = new.module(re_not_word.sub('_',key))
> 
> 
> AttributeError: 'module' object has no attribute 'module'
> 
> 
> HELP?
> 
> _________________________________________________________________
> Krijg direct antwoord op je vragen: MSN Messenger 
> http://www1.imagine-msn.com/Messenger/Default2.aspx
> 
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python


More information about the Mod_python mailing list