Hello daniweb

I am currently trying to convert one of my finished python games to a working executable file for windows, which proves harder than expected even though the py2exe side-package is avalable.

The program i'm trying to convert is The Pirate Game. I create the standard file for using py2exe:

from distutils.core import setup
import py2exe

setup(console=['game.py'])

And it seems to work properly and sucessfully create the build and dist folder in the directory. But when i try to run the game.exe it immediately crashes with the error that it can't find the options.sav file (which it should automatically create if it doesn't exist - and does when it's a python program). Well okay i can supply that file...
Next it says that it can't find the image files i'm using - copy that folder to the /dist/ aswell.

Next comes the error that I have no idea how to fix (the attached picture), it has something to do with the Font module of pygame (i think?) and the error is the same if i include to .TTF file or just use the system font.

I hope someone can help me with this because having a .exe file of the game makes it accessable to alot more people, not just python freaks like me ;-)

Thanks alot in advance
// Nezbo

Usable info:
Python Version: 2.6.5
Pygame Version: 1.9.1
Py2exe Version: 0.6.10

I guess your setup.py is messed up.

But as I can't see it, it's only a guess.

I guess your setup.py is messed up.

But as I can't see it, it's only a guess.

the "setup.py" is the one i have called exe.py (and included as code)

Can you see in here mate.

Cheers and Happy coding

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.