python - py2exe converted script does not run win32com.client correctly -


i have seen couple posts related issue on other sites, nothing worked. make long story short, program importa win32com.client access microsoft word. create standalone executable using py2exe , every time user selects option open ms word keyerror. below code compiler claims error is:

# call ms word app ms_word = win32com.client.gencache.ensuredispatch('word.application') 

and below result when program run particular line:

exception in tkinter callback traceback (most recent call last): file "tkinter.pyc", line 1536, in __call__ file "prototype_pce.py", line 46, in scan file "win32com\client\gencache.pyc", line 544, in ensuredispatch file "win32com\client\clsidtoclass.pyc", line 46, in getclass keyerror: '{00020970-0000-0000-c000-000000000046}' 

i using tkinter well, not source of issue. opening ms word program new feature have added , fails when create standalone application. have tried pyinstaller , line of errors increased. in advance!

okay! reason library.zip file py2exe creates after being run not allow modules win32com.client import program. why? not know noob @ stuff. anyway following solution works well, if had no problem @ all. should included in setup.py script. taken post. hope helps :)

setup(   ...  zipfile="foo/bar.zip",  options={"py2exe": {"skip_archive": true}}) 

ignoring library.zip in py2exe


Comments

Popular posts from this blog

jOOQ update returning clause with Oracle -

java - Warning equals/hashCode on @Data annotation lombok with inheritance -

java - BasicPathUsageException: Cannot join to attribute of basic type -