[mod_python] PSP Response

Jim Gallacher jg.lists at sympatico.ca
Tue May 17 19:59:35 EDT 2005


If you mention a variable named session in your psp page, psp will try 
and create a new session instance. Since your main code has already 
created a session (I assume), you'll get a deadlock. Either unlock the 
session before the psp.PSP call, or better yet, just rename your session 
variable to session_id.

This behaviour will hopefully be fixed in an upcoming release.

Jeremy Kohansimeh wrote:
> Hello,
> 
> The following fragment of code will sometimes return a response and 
> other times just hang:
> 
> <code>
> def genGraphWAnnotsHTMLResponse( req, frames):
>     """generates HTML response for request to graph"""
>    
>     session = req.session
>     seg_facade = session.seg_facade
>    
>     column_header, data = genSegmentAnnotsHTML( frames, 
> session.chrom_num, seg_facade)
>    
>     vars = { 'p_extend' : seg_facade.p_extend, \
>              'p_break' : seg_facade.p_break, \
>              'plot_image' : os.path.join( '../../images', 
> session.original_image), \
>              'session' : session.id(), \

change to:
                'session_id': session.id()

>              'cols' : column_header.__str__(), \
>              'data' : data.__str__() }
> 
>     return psp.PSP( req, filename=ZOOM_WANNOTS_TMPL, vars=vars)
> </code>
> 
> The path from the handler to here appears to be working fine.  I did 
> some debugging and can tell that the problem is somewhere in the psp.PSP 
> call.  I think it may have something to do with the interpreter, but 
> that is just a wild guess.  Has anyone had similar issues?

This an known issue and hopefull this behaviour will be fixed in an 
upcoming release.

Regards,
Jim


More information about the Mod_python mailing list