[mod_python] global name 'strcache' is not defined in psp.py

Gregory (Grisha) Trubetskoy grisha at modpython.org
Sun May 9 14:53:10 EST 2004

Looks like a typo/bug. I think instead of strcache it was meant to say
mem_scache (which is defined at the end of the file) - try replacing it,
let me know if it works, we'll patch up the code then.


On Sat, 8 May 2004 techead at technetos.com wrote:

> I've been experimenting with the psp module of mod_python.  I was
> attempting to use a string (rather than using a template file) to
> create a psp template with a line of code similar to this:
> template=psp.PSP( req, string=template_str, vars=varparms )
> where template_str is a simple HTML document embedded in """  """ as
> a Python string and varparms is a dictionary.
> The last part of the debug output to the browser looks like this:
>   File "/usr/local/lib/python2.3/site-packages/mod_python/psp.py",
> line 114, in __init__
>     cached = strcache.get(string)
> NameError: global name 'strcache' is not defined
> I have looked through psp.py and found that strcache is not defined
> anywhere in Python nor mod_python.  Is this a bug or omission in
> psp.py or is there something missing on my system?
> _______________________________________________
> 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