win32com calling IE: OLE error 0x800704a6

K

KvS

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,999
Messages
2,570,243
Members
46,836
Latest member
login dogas

Latest Threads

Top