win32com and IIS?

Arad Rostampour arad at
Sun Nov 7 03:34:13 EST 1999

Thanks for the quick reply...Here is a simpler example with debugging flags

import win32com.client
ieweb = win32com.client.Dispatch("InternetExplorer.Application")
print ieweb.Document.Body.innerText

Attribute Document not in cache
Getting property Id 0xcb from OLE object
Traceback (innermost last):
  File "d:\inetpub\scripts\news\", line 252, in ?
  File "d:\inetpub\scripts\news\", line 234, in PrintHeader
  File "d:\inetpub\scripts\news\", line 210, in HandleMail
    print ieweb.Document.Body.innertext
  File "f:\python\win32com\client\", line 319, in __getattr__
    raise pythoncom.com_error, details
pywintypes.com_error: (-2147023169, 'The remote procedure call failed and
did not execute.', None, None)

Again, it works from the python interactive interpreter but does not work in
a cgi script under IIS.  It doesn't like getting ieweb.Busy either...Also,
are there any issues with running the COM interface not specifically as
myself or a specific user, but rather IUSR_machinename?  Is there any
special set-up besides the Script Map key that ties a .py file to python?

Arad Rostampour- arad at
NT Platform and I/O Team
Software and System Development Lab
Mark Hammond wrote in message ...
>I have never seen this before.  However, these details really arent enough
>to help me diagnose the problem.  It is possible to break this down
>Mail me if you want help doing this.  A good start would be to turn on the
>debugging flags at the top of win32com\client\
>Arad Rostampour wrote in message <802s6a$mj5$1 at>...
>>I've been using win32com to access IE and get webpages using:
>>import win32com.client
>>ie = win32com.client.Dispatch("InternetExplorer.Application")
>>This works fine from the command line.  But, when I try to do this from a
>>CGI script under IIS, I get the following error:
>>File "f:\python\win32com\client\", line 319, in __getattr__
>>pythoncom.com_error, details pywintypes.com_error: (-2147467259,
>>'Unspecified error', (0, None, None, None, 0, -2147467259), None)
>>exceptions.AttributeError: in ignored
>>Any ideas on how to work around this?

More information about the Python-list mailing list