Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Python

win32com calling IE: OLE error 0x800704a6

 

 

Python python RSS feed   Index | Next | Previous | View Threaded


keesvanschaik at gmail

Nov 26, 2009, 1:06 PM

Post #1 of 1 (212 views)
Permalink
win32com calling IE: OLE error 0x800704a6

Dear all,

I have written a Python script that runs on Windows XP with Python 2.5
and uses Internet Explorer to 'pretty print' some HTML output. This
has been working perfectly fine for a few years until recently IE was
upgraded to version 8. Now occasionally Python throws an error that
originates from the win32com.client.Dispatch() method and has
description 'OLE error 0x800704a6'. (Occasionally means that sometimes
it happens, sometimes it doesn't. I haven't been able to figure out
what the trigger exactly is.) The most recent version of win32com is
installed. Google on the error code didn't give me a lot of hits, and
no useful ones.

So, I was hoping somebody might be able to give me some pointers what
might be going on.

Here is the relevant (very straightforward) Python code:

import win32com.client

class IE:
def __init__(self,url=None,vis=0,standalone=False):
#Pas registerwaardes aan voor het printen:
if not standalone:
self.regOld=self.getRegValues()
self.setRegValues
({'margin_left':'0.00000','margin_right':'0.00000','footer':'','header':''})
#Start instantie van IE op:
self.ie=win32com.client.Dispatch
('InternetExplorer.Application')
self.ie.Visible = vis
if url!=None:
self.ie.Navigate(url)

and the class furthermore implements some methods to open & print some
HTML-file.

Unfortunately I only have a screenshot of the error:
http://tweakers.net/ext/f/cAdKjyjs7w4yZRu6s4RqNwjW/full.png

Thanks in advance for your thoughts, Kees
--
http://mail.python.org/mailman/listinfo/python-list

Python python RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.