Python ActiveX Scripting Engine (0x80020009) Error - KeyboardInterrupt - python 2.2

B martin_byrne2 at yahoo.co.uk
Wed May 29 11:57:39 EDT 2002


Hi,

Im currently using ActivePython 2.2, win2k and IIS 5.0. I am using
python as the scripting language for most of my asp pages and on the
whole its doing a good job, however, when I use Response.Redirect I
get the error listed at the end of this post,which was a bug in
earlier versions of python but,I thought, solved in 2.2:

An example of the 4 test pages Im using are listed below. I know
javascript is not the problem because I started my testing with two
python pages redirecting to each other *only* and got the error.The
javascript pages are only so I can see whats happening.

Problem 1:
Initially I was having the problem where an asp page would work fine
the first time (after iis was started or the file itself was saved)
but each time after that I would get a white blank page. I solved this
by replacing the framework.py from win32all-146(included with
activepython 2.2) with the framework.py from win32all-140. This solved
the blank page problem but led to problem 2.

Problem 2:
Until today I was getting a HTTP/1.1 500 Server Error so i ran
pyscript --unregister and then pyscript to remove and reregister the
python activex components. This solve the 500 error but has left me
with the keyboardInterrupt error-problem 3.

Problem 3:
I managed to get rid of the error by enabling server side debugging in
IIS. This solution is far from satisfactory as there are performance
and stability issues with leaving script debugging switched on.

Has anyone any Ideas how to solve this KeyboardInterrupt
problem(correctly) or why turning on server side debugging seems to
keep the error at bay. Could it be to do with threading models as
debugging serializes threads ?

ERROR MESSAGE + TEST SCRIPTS BELOW

Error Type:
Python ActiveX Scripting Engine (0x80020009)
Traceback (innermost last): 
File "<Script Block >", line 1,
in ? Response.WriteBlock(0) File
"C:\Python22\Lib\site-packages\win32comext\axscript\client\pyscript.py",
line 150, in __getattr__ return
getattr(self._scriptItem_.dispatchContainer,attr) File
"C:\Python22\Lib\site-packages\win32com\client\dynamic.py",
line 390, in __getattr__ return self._make_method_(attr) File
"C:\Python22\Lib\site-packages\win32com\client\dynamic.py",
line 274, in _make_method_ methodCodeList =
self._olerepr_.MakeFuncMethod(self._olerepr_.mapFuncs[name],
methodName,0)
File "C:\Python22\Lib\site-packages\win32com\client\build.py",
line 310, in MakeFuncMethod return self.MakeDispatchFuncMethod(entry,
name, bMakeClass)
File "C:\Python22\Lib\site-packages\win32com\client\build.py",
line 355, in MakeDispatchFuncMethod s = '%s\treturn
self._oleobj_.InvokeTypes(0x%x, LCID, %s, %s, %s%s)' % (linePrefix,
id, fdesc[4], retDesc, argsDesc, _BuildArgList(fdesc, names))
KeyboardInterrupt

Test Pages being used: 

Test.asp
<%@ language=python%>
<html>
<%Response.Redirect("test1.html")%>
</html>
---------------
Test1.asp
<%@ language =Python%>
<html>
<head>
<%Response.Redirect("test.html")%>
</head>
</html>
---------------
test.html
<html>
<head>
 <body>
 GOT There
<script language=javascript>
location.href ="http://testServer/asptest/test.asp"
</script>
</body>
</head>
</html>
------------------
test1.html
<html>
<head>
 <body>
 GOT HERE
<script language=javascript>
location.href ="http://testServer/asptest/test1.asp"
</script>
</body>
</head>
</html>



More information about the Python-list mailing list