KeyboardInterrupt in IIS?
Mark Hammond
MarkH at ActiveState.com
Fri Mar 16 17:57:28 EST 2001
fluxent at yahoo.com wrote:
> I'm running Python via ASP pages in IIS (win2k).
>
> Occasionally I start getting errors when I ask for any page that look
> like
> HTTP 500.100 - Internal Server Error - ASP error
> Internet Information Services
>
> ----------------------------------------------------------------------
> ----------
>
> Technical Information (for support personnel)
>
> Error Type:
> Python ActiveX Scripting Engine (0x80020009)
> Traceback (innermost last): KeyboardInterrupt:
> /test/biztrack/admin/timechargesReview.asp
>
> It eventually seems to go away on its own, or else I reboot (gee,
> thought I didn't have to do that anymore...)
I have no idea what causes this, but do seem to understand what Python
is doing.
Python installs a Ctrl+C handler. For some reason, it appears this
handler fires at strange times, even when Python is _not_ running.
However, Python still sets an internal flag. Next time Python is
entered, it immediately dies with this exception as the flag is set.
I think I need to change the code to ensure that Python ignores this and
any other pending Python exception that is set whenever a COM call is
entered. Can anyone see a reason _not_ to do this? We did it for xpcom
and it solved similar issues. It does however mean that Ctrl+C will
generally only kill Python code if Python code is actually running as it
is pressed. This sounds OK to me...
Mark.
More information about the Python-list
mailing list