McMillan Installer - NameError: name 'Analysis' is not defined

kcollins15 at cfl.rr.com kcollins15 at cfl.rr.com
Sat Dec 7 16:27:01 EST 2002


Hi,
I have just discovered the beauty of creating a standalone python executable.  
I have not mastered the config spec yet, I am using the spec generated by the 
Makespec.py. 
***********onefile.spec **************
a = Analysis
(['C:\\Installer\\support\\_mountzlib.py', 'C:\\Installer\\support\\useUnicode.p
y', 'C:\\Installer\\onefile\\onefile.spec', 'C:\\projects\\nginstall\\python\\wi
ndows_adduser.py'],
             pathex=[])
pyz = PYZ(a.pure)
exe = EXE(pyz,
          a.scripts,
          exclude_binaries=1,
          name='buildonefile/onefile.exe',
          debug=0,
          strip=0,
          console=1 )
coll = COLLECT( exe,
               a.binaries,
               strip=0,
               name='distonefile')
******************************************************
Next I build with some warnings.  Looks like I can disregard most of these 
warnings based on the reading I've done. 
**************warnonefile.txt ***************
W: no module named posix (conditional import by os)
W: no module named dos (conditional import by os)
W: no module named os2 (delayed, conditional import by iu)
W: no module named riscosenviron (conditional import by os)
W: no module named mac (conditional import by os)
W: no module named riscospath (conditional import by os)
W: no module named riscos (conditional import by os)
W: no module named posix (delayed, conditional import by iu)
W: no module named pwd (delayed, conditional import by posixpath)
W: no module named mac (delayed, conditional import by iu)
W: no module named dos (delayed, conditional import by iu)
W: no module named os2 (conditional import by os)
W: no module named ce (conditional import by os)
W: no module named org (top-level import by copy)
W: __all__ is built strangely at line 56 - __future__ (C:\Python22
\lib\__future__.pyc)
W: delayed conditional exec statment detected at line 353 - iu 
(C:\Installer\iu.pyc)
W: delayed  __import__ hack detected at line 51 - encodings (C:\Python22
\lib\encodings\__init__.pyc)
W: __all__ is built strangely at line 28 - re (C:\Python22\lib\re.pyc)
W: __all__ is built strangely at line 33 - re (C:\Python22\lib\re.pyc)
**********************************************************************
My problem is when I execute my generated onefile.exe, I get this error:
C:\Installer\onefile\distonefile>onefile
Traceback (most recent call last):
  File "<string>", line 1, in ?
NameError: name 'Analysis' is not defined
Drive:      C:\
FreeSpace:  10545 MB
TotalSpace: 14590 MB
UsedSpace:  4045 MB
and then I get my expected results.  This is weird to me. How can the 
executable not understand what ‘Analysis’ is but still execute my py code and 
deliver my expected results?
PLEASE HELP!
thx
KC








More information about the Python-list mailing list