[mod_python] Publisher Handler

Arnaldo Riquelme ajr at dynacap.com
Thu Mar 11 19:51:47 EST 2004


I'm getting familiar with PSP and mod_python in general. I'm also reading
Gregory Trubetskoy O'Reilly Article from 2/26/2004.
I'm having trouble running the example on 'Using PSP as a Templating
System'.

I'm running Apache 2.0.48 ,Python 2.3, mod_python 3.1.2b  on a Windows 2000
machine.
I have this on my Apache config

 <Directory "C:/Program Files/Apache Group/Apache2/htdocs/publisher">
SetHandler mod_python 
PythonHandler mod_python.publisher
PythonDebug On
</Directory>

I also have the two files from the article hello.tmpl and pubpsp.py both on
C:/Program Files/Apache Group/Apache2/htdocs/publisher.
When I run http://localhost/publisher/pubpsp/hello I get his error message
----------------------------------------------------------------------------
-------------------------------------------------------
 Mod_python error: "PythonHandler mod_python.publisher"
Traceback (most recent call last):
  File "C:\Python23\Lib\site-packages\mod_python\apache.py", line 338, in
HandlerDispatch
    result = object(req)
  File "C:\Python23\Lib\site-packages\mod_python\publisher.py", line 164, in
handler
    result = util.apply_fs_data(object, req.form, req=req)
  File "C:\Python23\Lib\site-packages\mod_python\util.py", line 400, in
apply_fs_data
    return object(**args)
  File "C:/Program Files/Apache Group/Apache2/htdocs/publisher\puppsp.py",
line 8, in hello
    tmpl = psp.PSP(req, filename='hello.tmpl')
  File "C:\Python23\Lib\site-packages\mod_python\psp.py", line 143, in
__init__
    self.load_from_file()
  File "C:\Python23\Lib\site-packages\mod_python\psp.py", line 194, in
load_from_file
    raise ValueError, "%s is not a file" % filename
ValueError: hello.tmpl is not a file
----------------------------------------------------------------------------
--------------------------------------------------------------

Why does it say that hello.tmpl is not a file? Can anyone point out what I'm
missing here?

Thanks a lot

Arnaldo


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.modpython.org/pipermail/mod_python/attachments/20040311/27ca3460/attachment.html


More information about the Mod_python mailing list