COM problem .py versus .exe

G

Greg Miller

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.
 

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

Staff online

Members online

Forum statistics

Threads
473,769
Messages
2,569,577
Members
45,052
Latest member
LucyCarper

Latest Threads

Top