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

techead at technetos.com techead at technetos.com
Sat May 8 23:52:27 EST 2004


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?


More information about the Mod_python mailing list