win32com and IIS?

Arad Rostampour arad at fc.hp.com
Sun Nov 7 09:34:13 CET 1999


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

import win32com.client
ieweb = win32com.client.Dispatch("InternetExplorer.Application")
ieweb.Navigate("http://www.hp.com")
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\news.py", line 252, in ?
    PrintHeader(form)
  File "d:\inetpub\scripts\news\news.py", line 234, in PrintHeader
    HandleMail(form)
  File "d:\inetpub\scripts\news\news.py", line 210, in HandleMail
    print ieweb.Document.Body.innertext
  File "f:\python\win32com\client\dynamic.py", 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?

Thanks,
Arad
--
Arad Rostampour- arad at fc.hp.com
NT Platform and I/O Team
Software and System Development Lab
Hewlett-Packard
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
further?
>
>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\dynamic.py...
>
>Mark.
>
>Arad Rostampour wrote in message <802s6a$mj5$1 at web1.cup.hp.com>...
>>Hi,
>>
>>I've been using win32com to access IE and get webpages using:
>>
>>import win32com.client
>>ie = win32com.client.Dispatch("InternetExplorer.Application")
>>ie.Navigate("http://www.hp.com")
>>...
>>
>>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\dynamic.py", line 319, in __getattr__
raise
>>pythoncom.com_error, details pywintypes.com_error: (-2147467259,
>>'Unspecified error', (0, None, None, None, 0, -2147467259), None)
Exception
>>exceptions.AttributeError: in ignored
>>
>>Any ideas on how to work around this?
>
>
>






More information about the Python-list mailing list