[mod_python] Revisiting ImportError: cannot import name psp

Alexis Marrero-Narváez amarrero at mitre.org
Wed Dec 22 10:54:21 EST 2004


All,

I'm getting an intermittent ImportError when I access a index.py.

I'm using mod_python.publisher and psp to do templates. The first line  
in index.py is from mod_python import apache, psp.

The first time that I access the URL it brings the page back  
successfully. However if I keep reloading the page it might fail or it  
might succeed.

mod_python 3.1.3

My http.conf (Apache2) has:
        AddHandler python-program .py
         PythonHandler mod_python.publisher

My OS is OS X (10.3.7).

Traceback is:
Mod_python error: "PythonHandler mod_python.publisher"

Traceback (most recent call last):

   File  
"/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ 
python2.3/site-packages/mod_python/apache.py", line 299, in  
HandlerDispatch
     result = object(req)

   File  
"/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ 
python2.3/site-packages/mod_python/publisher.py", line 98, in handler
     path=[path])

   File  
"/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ 
python2.3/site-packages/mod_python/apache.py", line 457, in  
import_module
     module = imp.load_module(mname, f, p, d)

   File "/www/assets/new-albums/2004/index.py", line 1, in ?
     from mod_python import apache, psp

ImportError: cannot import name psp

Any feedback?

/amn
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 1349 bytes
Desc: not available
Url : http://mm_cfg_has_not_been_edited_to_set_host_domains/pipermail/mod_python/attachments/20041222/f89c099d/attachment.bin


More information about the Mod_python mailing list