468,321 Members | 1,820 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,321 developers. It's quick & easy.

Py2exe and WMI module

I'm having a problem when I try to make a standalone installation of a
Python program using Tim Goldens WMI-module. The py2exe produce the
exe-file as expected, but it fails to execute.

I have run makepy manually on one all of the above libraries.

Microsoft WMI Scripting Library
WMI ADSI Extension Type Library
WMICntl Type Library
test-fail.py (my script)
-----------------------
import wmi
-----------------------
setup.py (my setupscript)
-----------------------
# setup.py
from distutils.core import setup
import py2exe

setup(console=["test-fail.py"])
-----------------------
Output from exe-file:
Traceback (most recent call last):
File "test-fail.py", line 1, in ?
import wmi
File "wmi.pyc", line 132, in ?
File "win32com\client\gencache.pyc", line 527, in EnsureDispatch
File "win32com\client\CLSIDToClass.pyc", line 50, in GetClass
KeyError: '{D2F68443-85DC-427E-91D8-366554CC754C}'

Anyone?

regards
Olav
Jul 18 '05 #1
1 2557
Hello Olav,
I have run makepy manually on one all of the above libraries. Microsoft WMI Scripting Library
WMI ADSI Extension Type Library
WMICntl Type Library
Traceback (most recent call last):
File "test-fail.py", line 1, in ?
import wmi
File "wmi.pyc", line 132, in ?
File "win32com\client\gencache.pyc", line 527, in EnsureDispatch
File "win32com\client\CLSIDToClass.pyc", line 50, in GetClass
KeyError: '{D2F68443-85DC-427E-91D8-366554CC754C}'

Look at:
http://starship.python.net/crew/theller/moin.cgi/Py2Exe

With py2exe 0.5.0 there is an example with WMI (I think it's the
"advanced" one)

Also there are some troubles with the name of the zip-file and win32all.

Furthermore 0.5.0 got big improvements handlign win32com -Stuff.

There is also a "typelib"-directive in 0.5.0, so maybe you can force the
inclusion of typelib {D2F68443-85DC-427E-91D8-366554CC754C}

HTH

Harald
Jul 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by | last post: by
2 posts views Thread by Marc Ederis | last post: by
5 posts views Thread by Thomas Heller | last post: by
9 posts views Thread by Isaac Rodriguez | last post: by
4 posts views Thread by vincehofmeister | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.