[mod_python] PSP Error & apache.import_module() questions

Peter Sanchez petersanchez at gmail.com
Wed May 10 00:56:22 EDT 2006

On May 9, 2006, at 9:30 PM, Jim Gallacher wrote:

> Peter Sanchez wrote:
>> On Tue, May 09, 2006 at 04:57:04PM -0400, Jim Gallacher wrote:
>>> Peter Sanchez wrote:
>>>> Hey  
>>>> all...                                                              
>>>>                                                I have been  
>>>> getting these errors more and more. I am sure they are          
>>>> related to my template files, but not sure what the error really  
>>>> means.    Here it is  
>>>> (trimmed):                                                          
>>>>                                         <snip to the  
>>>> meat>                                                               
>>>>                                       PythonHandler  
>>>> mod_python.publisher:   File                                 "/ 
>>>> usr/local/lib/python2.4/site-packages/mod_python/psp.py", line  
>>>> 213, in   run\n    exec code in  
>>>> global_scope                                          
>>>> PythonHandler mod_python.publisher:    
>>>> File                                 "/home/ahcabron/data/ 
>>>> templates/view_img.tmpl", line 160, in ?\n    % 
>>>> >                                                                   
>>>>                                                   </ 
>>>> snip>                                                               
>>>>                                                  Now, line 160  
>>>> in view_img.tmpl is literally "%>\n" and that's  
>>>> it.                                                                 
>>>>                                                         I am  
>>>> using mod_python.publisher, and mod_python.psp as my  
>>>> template         engine. Can anyone help me out with this error  
>>>> msg and what it means?      The next line in the traceback can  
>>>> be from any one of my templates, at     various other line  
>>>> numbers. It isn't just in view_img.tmpl, it can be in   any of  
>>>> my templates and always at a line where "%>\n" is all there  
>>>> is.                                                                 
>>>>                                                    Here is my  
>>>> environment  
>>>> info:                                                               
>>>>                             Apache/2.0.54 (FreeBSD) PHP/4.4.0  
>>>> mod_python/3.2.7 Python/2.4.1
>>> Uhm, I think maybe you cut into the bone when trimming. You know,  
>>> the bit that says:
>>> InquisitionError: warning, wasn't expecting the Spanish Inquisition
>>> Or whatever. Otherwise we'd just be guessing. At this point all I  
>>> can say is that there is problem somewhere before line 160 in  
>>> your template. :)
>> Heh, sorry. Here is the entire error. It didn't seem like the other
>> lines from the traceback were very useful. Here you go :)
>> [Tue May 09 14:06:08 2006] [error] [client]  
>> PythonHandler
>> mod_python.publisher: IOError: Write failed, client closed  
>> connection.,
> The IOError is telling you that the client has closed the  
> connection before mod_python can finish writing. In other words,  
> the browser has timed out or the user has hit stop button. That  
> would seem consistent with the fact that it is happening in  
> different templates.

I actually figured that was the error, but it seems to be happening  
more and more, so I was thinking it may be caused by something else.  
The server has been under a load lately and is in desperate need of  
an upgrade, which is supposed to happen this weekend. I will see if  
that has any benefit.



> Jim

More information about the Mod_python mailing list