KeyboardInterrupt errors in ASP pages

Jim Abrams jim at publishingresources.com
Tue Apr 16 12:27:43 EDT 2002


Mark Hammond <mhammond at skippinet.com.au> wrote in
news:3CB83C5C.9040704 at skippinet.com.au: 

> Max M wrote:
>> B wrote:
>> 
>>> I am using Python as the language for creating server side asp pages.
>>> The problem is that when using Response.Redirect(page), I seem to get
>>> the message below randomly but frequently enough to be a problem.
>>>
>>> Has anyone else found this problem and is there a way around it. Is
>>> it a bug in the Response.Redirect code?
>>>
>>> Python ActiveX Scripting Engine error '80020009'
>>> Traceback (innermost last): KeyboardInterrupt
>>> /Default.asp, line 0
>> 
>> 
>> As far as I understand it's a known bug, but without any known
>> solution. I get it too at times.
>> 
>> I have just signed over a project to a customer on .asp/iis so I am a 
>> bit worried about it. But I don't really know what to do about it.
>> 
>> Maybe I should write a test harness to pound the IIS to see if I can 
>> provoke the error. 
> 
> Yes please - that is exactly what I need.  I need some way to provoke 
> the error often enough that I can afford to "wait" for it in a
> debugger. 
>   Anything you can do to get a reliable repro would be a big help!
> 
> Mark.
> 

If I remember correctly, (from what Mark has said), this error is caused 
not by Python or win32 alone, but by extraneous system factors affecting 
Python.

I've been able to workaround it with this in global.asa:

<SCRIPT LANGUAGE=VBScript RUNAT=Server>
function noOp()
end function
</SCRIPT>

<script language=Python runat=server>
def Application_OnStart():
	try:
		import signal
		signal.signal(signal.SIGINT, lambda a,b:None)
	except AttributeError:
		pass
	except ValueError:
		pass
</SCRIPT>


Desperate measures...

-J



More information about the Python-list mailing list