473,386 Members | 1,791 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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 2750
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: | last post by:
I want a binnary file to my aplicattion, but py2exe don't match the xmll.sax module. the py2exe shows this errors: warning: py2exe:...
2
by: x-herbert | last post by:
Hi, I have a small test to "compile" al litle script as a WMI-Tester. The script include a wmi-wrapper and "insert" the Win32-modeles. here the code: my "WMI-Tester.py" ----- import wmi
1
by: Marc | last post by:
Hello, I've fiddled with this for quite a while and thought I had the problem solved. I had a version that would successfully compile and run. But then I had to change the code to use a...
2
by: Marc Ederis | last post by:
Hello, I'm trying to create an executable with py2exe, and it uses the odbc module. The script runs fine until I use py2exe on it and run the ..exe. Then I get: -- Traceback (most recent...
3
by: Werner Merkl | last post by:
Hi, Python is really great, for small to big programs. For my colleagues and some circumstances I sometimes need to "compile" a script using py2exe. Cause I use Windows, I like to use the...
0
by: F. GEIGER | last post by:
py2exe and datetime -> No module named datetime I've begun to use the stdlib module datetime instead of my home brewn classes. Since then a py2exe app doesn't run anymore: Traceback (most...
5
by: Thomas Heller | last post by:
**py2exe 0.5.4** released =================================== py2exe is a Python distutils extension which converts python scripts into executable windows programs, able to run without requiring...
9
by: Isaac Rodriguez | last post by:
Hi, I am looking for feedback from people that has used or still uses Py2Exe. I love to program in python, and I would like to use it to write support tools for our development team, but I...
0
by: Barak, Ron | last post by:
Hi, I'm trying to compile using py2exe, and am getting the following: $ python_win Setup.py py2exe running py2exe creating c:\Documents and Settings\rbarak\rbarak_devel\dpm09\build creating...
4
by: vincehofmeister | last post by:
Hey everyone: I am using py2exe and everything is working fine except one module, ClientCookie, found here: http://wwwsearch.sourceforge.net/ClientCookie/ Keeps coming up as not found no...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.