Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

python win32com Causes Program crash

I wrote program to control iTunes by monitoring keystrokes from with pyHooks and then interfaceing with the iTunes COM interface.

The program works fine, the only problem I have is when I try to compile it with py2exe. The program always crashes with this traceback:

Traceback (most recent call last): File "threading.pyc", line 527, in __bootstrap_inner File "iTunesControl.py", line 24, in run File "win32com\client\gencache.pyc", line 540, in EnsureDispatch File "win32com\client\CLSIDToClass.pyc", line 46, in GetClass KeyError: '{9DD6680B-3EDC-40DB-A771-E6FE4832E34A}'

py2exe reports no errors...

like image 346
Joshkunz Avatar asked May 13 '26 16:05

Joshkunz


1 Answers

The problem is probably that the py2exe version isn't able to access the cache of wrappers generated by win32com.

Here's a recipe for dealing with this problem.

like image 119
Ryan Ginstrom Avatar answered May 16 '26 05:05

Ryan Ginstrom