Trouble with Python in ASP development
gbreed at cix.compulink.co.uk
gbreed at cix.compulink.co.uk
Tue Jun 5 08:33:15 EDT 2001
In article <2auR6.3608$lM3.84473 at news1.oke.nextra.no>,
thomas at cintra.no (Thomas Weholt) wrote:
> I'm trying to use python as script-language in ASP, using MS
IIS.
> When something in my python-code raises an exception the
loading of the
> page
> just stops,
> and nothhing after the code that raises the exception is sent
to the
> client.
> No error-message is given.
I've never known the exception not be displayed, unless you
suppress it. Try viewing the HTML source in the browser to see
if the message is hiding.
> Is there any way to get more info from ISS or find out what
goes wrong?
> Passing the same parameters to a Kunde-object in the python
interpreter
> works just fine. In ASP it just won't work.
I'm not sure what your problem is here. The exceptions IIS
generates are of type com_error. So put
from pywintypes import com_error
at the top of the page. Then some exception handling could be
except com_error, ohdear:
Response.Write(str(ohdear))
Which, IIRC, shows what would have been displayed if you hadn't
caught the exception. It does have to be str and not repr in
this case.
All of which may have no connection with what you wanted to know
...
Graham
More information about the Python-list
mailing list