From: Grant E. <gr...@vi...> - 2008-01-16 16:01:42
|
On 2008-01-16, Grant Edwards <gr...@vi...> wrote: > After making a few minor changes to an application, I bundled > up a new version, and suddenly the .exe doesn't work. It > appears unable to import any of the modules that are in > unable to import any modules from library.zip: > > Traceback (most recent call last): > File "surfedit.py", line 2, in ? > zipimport.ZipImportError: can't find module 'tempfile' > > Yet, tempfile.pyc is in library.zip: > > unzip -t library.zip | grep tempfile > > testign: tempfile.pyc OK If I simply unzip library.zip, I then get a different error: Traceback (most recent call last): File "surfedit.py", line 2, in ? ImportError: Bad magic number in c:\Program Files\RivaTek\VFC-SurfaceEditor\tempfile.pyc I'm a bit baffled. The application works fine if I run it using "python progname.py". Why is py2exe producing .pyc files with bad magic numbers? -- Grant Edwards grante Yow! Hold the MAYO & pass at the COSMIC AWARENESS ... visi.com |