py2exe error

py2exe error

Postby metulburr » Sun Apr 20, 2014 1:55 am

I figured i would re-compile the latest code from my pong repo as the old exe is quite far behind the code
https://github.com/metulburr/pong

I did successfully get this to work, but I bought a new windows computer since then, andthis is the first time trying to compile an exe out of a python script on this new computer.

running the game under python directly works fine:
Code: Select all
C:\Users\metul_000\Downloads\pong-master\pong-master>python game.py
difficulty: medium
window size: [800, 600]

C:\Users\metul_000\Downloads\pong-master\pong-master>


running python setup.py from produces the output:
Code: Select all
...
*** copy extensions ***
*** copy dlls ***
copying C:\Python27\lib\site-packages\py2exe\run_w.exe -> C:\Users\metul_000\Dow
nloads\pong-master\pong-master\dist\game.exe
Adding python27.dll as resource to C:\Users\metul_000\Downloads\pong-master\pong
-master\dist\game.exe
The following modules appear to be missing
['AppKit', 'Foundation', 'Numeric', 'OpenGL.GL', '_scproxy', '_sysconfigdata', '
copyreg', 'dummy.Process', 'numpy', 'pkg_resources', 'queue', 'winreg', 'pygame.
sdlmain_osx']

*** binary dependencies ***
Your executable(s) also depend on these dlls which are not included,
you may or may not need to distribute them.

Make sure you have the license if you distribute any of them, and
make sure you don't distribute files belonging to the operating system.

   OLEAUT32.dll - C:\WINDOWS\system32\OLEAUT32.dll
   USER32.dll - C:\WINDOWS\system32\USER32.dll
   SHELL32.dll - C:\WINDOWS\system32\SHELL32.dll
   ole32.dll - C:\WINDOWS\system32\ole32.dll
   WINMM.DLL - C:\WINDOWS\system32\WINMM.DLL
   ADVAPI32.DLL - C:\WINDOWS\system32\ADVAPI32.DLL
   WS2_32.DLL - C:\WINDOWS\system32\WS2_32.DLL
   GDI32.dll - C:\WINDOWS\system32\GDI32.dll
   KERNEL32.dll - C:\WINDOWS\system32\KERNEL32.dll

C:\Users\metul_000\Downloads\pong-master\pong-master>


and move the new exe
Code: Select all
C:\Users\metul_000\Downloads\pong-master\pong-master>cp dist/game.exe game.exe

C:\Users\metul_000\Downloads\pong-master\pong-master>cp dist/w9xpopen.exe wpxpop
en.exe

C:\Users\metul_000\Downloads\pong-master\pong-master>game.exe

C:\Users\metul_000\Downloads\pong-master\pong-master>ls
LICENSE.txt   build  game.exe      readme.md  wpxpopen.exe
LICENSE.txt~  data   game.exe.log  resources
New folder    dist   game.py       setup.py

C:\Users\metul_000\Downloads\pong-master\pong-master>


in which a windows pops up saying to check this log file:
Code: Select all
C:\Users\metul_000\Downloads\pong-master\pong-master>cat game.exe.log
C:\Users\metul_000\Downloads\pong-master\pong-master\game.exe\zipextimporter.py:
82: RuntimeWarning: import math: No module named math
(ImportError: No module named math)
C:\Users\metul_000\Downloads\pong-master\pong-master\game.exe\zipextimporter.py:
82: RuntimeWarning: import pixelcopy: No module named pixelcopy
(ImportError: No module named pixelcopy)
Traceback (most recent call last):
  File "game.py", line 37, in <module>
    main(args['fullscreen'], difficulty, size)
  File "data\main.pyc", line 6, in main

  File "data\control.pyc", line 25, in __init__
    ↑           ♥↓      c
  File "data\states\menu.pyc", line 10, in __init__

  File "data\tools.pyc", line 73, in __init__

  File "data\tools.pyc", line 46, in __init__

  File "data\tools.pyc", line 58, in setup

pygame.error: Unrecognized music format

C:\Users\metul_000\Downloads\pong-master\pong-master>


I am not sure what is happening?


EDIT:
I tried the same technique to my Boom repo, and that worked flawlessly. So i am not sure what is wrong with this specifc pong repo.
New Users, Read This
OS Ubuntu 14.04, Arch Linux, Gentoo, Windows 7/8
https://github.com/metulburr
steam
User avatar
metulburr
 
Posts: 1312
Joined: Thu Feb 07, 2013 4:47 pm
Location: Elmira, NY

Re: py2exe error

Postby metulburr » Sun Apr 20, 2014 3:33 am

problem resolved:
I just deleted all the old dist and build directories from my previous build attempts, and after that it worked fine. I assumed that they would be overwritten after compiling it again, but i guess not. Will remember for next time though.
New Users, Read This
OS Ubuntu 14.04, Arch Linux, Gentoo, Windows 7/8
https://github.com/metulburr
steam
User avatar
metulburr
 
Posts: 1312
Joined: Thu Feb 07, 2013 4:47 pm
Location: Elmira, NY

Re: py2exe error

Postby Mekire » Sun Apr 20, 2014 3:34 am

Not sure what is going on. I just cloned your repo and made an exe that appears to work perfectly with no issue.

-Mek
User avatar
Mekire
 
Posts: 983
Joined: Thu Feb 07, 2013 11:33 pm
Location: Amakusa, Japan

Re: py2exe error

Postby metulburr » Sun Apr 20, 2014 3:40 am

looks like we posted at the same time. ^see above post. Thanks for checking it out though.
New Users, Read This
OS Ubuntu 14.04, Arch Linux, Gentoo, Windows 7/8
https://github.com/metulburr
steam
User avatar
metulburr
 
Posts: 1312
Joined: Thu Feb 07, 2013 4:47 pm
Location: Elmira, NY


Return to Game Development

Who is online

Users browsing this forum: No registered users and 2 guests