problem with from win32com.client import Dispatch

Shivayogimath D. shivayogimath_d at
Mon Nov 14 13:19:42 CET 2005

Hi all

Am trying to read an html page using win32com in the following way.


from win32com.client import Dispatch

ie = Dispatch("InternetExplorer.Application")


doc =ie.Document

print doc.body.innerHTML


with this code am easily able to read the mentioned page from the pythonwin
interactive window, but the same code if I write it in some *.py file, am not
able to read the page.


The following error it throws when I compile the file.


Traceback (most recent call last):

line 310, in RunScript

    exec codeObject in __main__.__dict__

  File "C:\Python23\Lib\site-packages\", line 14, in ?


  File "C:\Python23\Lib\site-packages\win32com\client\", line 456,
in __getattr__

    return self._ApplyTypes_(*args)

  File "C:\Python23\Lib\site-packages\win32com\client\", line 446,
in _ApplyTypes_

    return self._get_good_object_(

com_error: (-2147352567, 'Exception occurred.', (0, None, None, None, 0,
-2147467259), None)


if any body has the answer for this please help me in this.


Thanks and regards


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: disclaimer.txt
URL: <>

More information about the Python-list mailing list