From: Thomas H. <th...@py...> - 2005-03-22 16:50:58
|
"S.Holmgren" <ste...@ms...> writes: > Hi, > Got a strange error message when trying to run my new generated exe file > > Traceback (most recent call last): > File "<string>", line 2169, in ? > File "wxPython\wx.pyo", line 1957, in __init__ > File "<string>", line 1743, in OnInit > File "<string>", line 1562, in __init__ > NameError: global name 'ID_OPEN_PROJECT' is not defined > 16:19:17: Debug: e:\Projects\wx2.4\src\msw\app.cpp(407): > 'UnregisterClass(MDI parent)' failed with error 0x00000584 > (class still as open windows.). > > I have this constant, ID_OPEN_PROJECT, in a file (Define.py) that I > import in the begining of the code with "from Define import *", I have > no problem running the source code, just my exe file that generate > this error... I have never had this problem before and I have made exe > files with py2exe many time with the same code, no problem, but now > suddenly it wont work??!!??!!, i havent change a thing in the code > where I have this constant. > > Some how py2exe dont import or use the file Define!, but it looks like > he compile the file like before, I got no error from py2exe... I have no real explanation for this, but I have seen similar problems before by other people using 'from xyz import *' a lot. Maybe rewriting your code to avoid this idiom helps. Even better would be if someone finds the reason for this behaviour. Thomas |