Py2exe and WMI module

O

Olav

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
 
H

Harald Massa

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
 

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,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top