python 3.x - EnsureDispatch error when using cx_freeze for making exe -
i working python 3.4 on windows 7. setup file follows:
from cx_freeze import setup, executable, sys exe=executable( script="xyz.py", base="win32gui", ) includefiles=[] includes=[] excludes=[] packages=[] setup( version = "1.0", description = "xyz", author = "max", name = "at", options = {'build_exe': {'excludes':excludes,'packages':packages,'include_files':includefiles}}, executables = [exe] ) distutils.core import setup import py2exe, sys, os, difflib sys.argv.append('py2exe') setup( options = {'py2exe': {'bundle_files': 1}}, console = [{'script': "xyz.py"}], zipfile = none, ) when obtained exe run, error pops saying:
... file "c:\python34\lib\site-packages\win32com\client\clsidtoclass.py", line 46, in getclass return mapclsidtoclass[clsid] keyerror: '{00020970-0000-0000-c000-000000000046}' i can't figure out problem here. help, please.
thanks.
you using static proxy generated on disk , has compiled executable trouble finding. if not know static proxy is, using win32com.client.gencache.ensuredispatch generates static proxy automatically.
the easiest way fix problem use dynamic proxy using win32com.client.dynamic.dispatch. static proxy has benefits, there high possibility not need it.
you can find more information static , dynamic proxies com objects here: http://timgolden.me.uk/python/win32_how_do_i/generate-a-static-com-proxy.html
Comments
Post a Comment