[python-win32] win32all 152 + COM server + py2exe == trouble

Cory Dodt cdodt@fcoe.k12.ca.us
Thu, 06 Mar 2003 13:34:47 -0800


Maybe I'm the first one to report this; searching the ML hasn't turned 
up anything yet.  (Wouldn't surprise me.)

I have a py2exe'd COM server that uses your first recipe on the website. 
  It has been stable for some time now.  Recently I upgraded from 
win32all 148 to win32all 152 and found that the COM server wouldn't 
start in py2exe mode, even though it still works in pure python mode. 
After some registry spelunking I discovered that the key:
My Computer\HKEY_CLASSES_ROOT\CLSID\{my classid} _exists_, has the 
(default) attribute set, but is empty.  None of the subkeys are there, 
so naturally the COM server can't start because the subkeys are how COM 
knows what to run.

Reverting to win32all 150 fixed the problem.

Here's the matrix:
                 win32all 150         win32all 152
               _______________________________________
pure python  |  works            |      works
              |                   |
py2exe       |  works            |  uuggggggh. (He must have died while
              |                   |              carving it.)

(works==subkeys exist after registering, and server starts and runs fine)
(platform: win2000 SP3, Python 2.2.2 from python.org, distutils 
1.0.3CVS, py2exe 0.3.3)

On a side note: is there any way to inject into or attach a debugger to 
a py2exe program?  If I could figure out how to do that, I could 
probably find out what's wrong by myself.