By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,199 Members | 1,064 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,199 IT Pros & Developers. It's quick & easy.

COM problem .py versus .exe

P: n/a
I have a .DLL that I am extracting the file version from using wmi.py.
The specific code is:

c = wmi.WMI()
for f in
c.CIM_DataFile(Name="c:\\glossersdmsservices\\bin\ \glosscmanager.dll"):
sdmsver = f.Version

this works fine when running the application as a python file, when I
build the application into an executable, using py2exe, I get the
following error:

Traceback (most recent call last):
File "autoStart.pyc", line 241, in test
File "wmi.pyc", line 138, in ?
File "win32com\client\gencache.pyc", line 540, in EnsureDispatch
File "win32com\client\CLSIDToClass.pyc", line 50, in GetClass
KeyError: '{D2F68443-85DC-427E-91D8-366554CC754C}'

the .dll resides outside the directory of the executable. The one
thing I notice is that the KeyError value is a different id than the
COM object I am accessing. I'm not sure where the value in the
KeyError listed is coming from. Do I have to do some preprocessing in
the build script? I am at a bit of a loss here, so any input would be
appreciated. Thanks in advance.

Jul 19 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.