EnsureDispatch will not generate in frozen applications. You can
specify 'typelibs' in the py2exe options dict. The format is the same as
passed to EnsureModule and printed by "makepy -i" eg, to include the
MSOffice typelib you could say:
py2exe_options = {
'typelibs':
[
('{00062FFF-0000-0000-C000-000000000046}', 0, 9, 0),
('{00062FFF-0000-0000-C000-000000000046}', 0, 9, 0),
]
}
...
setup(name=...
options = {"py2exe":
py2exe_options}
-----Original Message-----Hello win32,
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of list repository
Sent: Thursday, 26 May 2005 3:37 PM
To: python-win32@python.org
Subject: [python-win32] Python 2.4:win32com:ADODB.Connection:py2exe:KeyError
Python 2.4
Problem:
Works fine when running python test.py but fails when executing test.exe.
[Note test.exe was created using py2exe]
conn = win32com.client.gencache.EnsureDispatch('ADODB.Connection')
conn.Open("Provider='SQLOLEDB';Data Source='.';Initial Catalog='mydatabase';User ID='user';Password='pwd';")
Traceback (most recent call last):
File "test.py", line 66, in ?
File "test.py", line 57, in main
File "test.py", line 16, in test_status
File "win32com\client\gencache.pyc", line 540, in EnsureDispatch
File "win32com\client\CLSIDToClass.pyc", line 50, in GetClass
KeyError: '{00000550-0000-0010-8000-00AA006D2EA4}'
Any suggestions...
_______________________________________________ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32