[mod_python] trying python publisher

Jim Gallacher jpg at jgassociates.ca
Wed Oct 11 07:57:26 EDT 2006


edgar mortiz wrote:
> hi guys,
> 
>   I tried out the publisher feature on mod_python and did the
> following instructions on
> 
> http://www.modpython.org/live/current/doc-html/tut-pub.html
> 
> but i got this error in the end, can anyone help me out on what's
> missing? thanks.
> 
> here's my specs:
> 
> Python 2.3.5
> mod_python-3.2.10
> Apache-2.0.59
> OpenBSD
> 
> thanks in advance
> 
> -------------- Error ----
> Mod_python error: "PythonHandler mod_python.publisher"
> 
> Traceback (most recent call last):
> 
>  File "/usr/local/lib/python2.3/site-packages/mod_python/apache.py",
> line 299, in HandlerDispatch
>    result = object(req)
> 
>  File "/usr/local/lib/python2.3/site-packages/mod_python/publisher.py",
> line 204, in handler
>    module = page_cache[req]
> 
>  File "/usr/local/lib/python2.3/site-packages/mod_python/cache.py",
> line 82, in __getitem__
>    return self._checkitem(name)[2]
> 
>  File "/usr/local/lib/python2.3/site-packages/mod_python/cache.py",
> line 124, in _checkitem
>    value = self.build(key, name, opened, entry)
> 
>  File "/usr/local/lib/python2.3/site-packages/mod_python/publisher.py",
> line 77, in build
>    return ModuleCache.build(self, key, req, opened, entry)
> 
>  File "/usr/local/lib/python2.3/site-packages/mod_python/cache.py",
> line 371, in build
>    exec opened in module.__dict__
> 
>  File "/apache/htdocs/publisher/form.py", line 24
> 
>    conn = smtplib.SMTP(SMTP_SERVER)
> 
>    ^
> 
> SyntaxError: invalid syntax

There is likely a problem with your syntax in form.py, just above line 24.

Jim



More information about the Mod_python mailing list