[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Please help!



Indeed, the solution to this and Zach's problem is to include the file "freesansbold.ttf" in the pygame folder in the dist\library.zip file. For the record, the crash also occurred with the 32 bit msvc9 build. No *.exe.log is created.

Christoph

On 11/1/2010 3:03 PM, Brian Fisher wrote:
That script below is well known to not work with py2exe+pygame because
of the default font path problem.

The expected result of running a naive py2exe'd pygame program that has
a "pygame.font.Font(None..." line in it, is that you would get a message
box directing you to a file named "<NameofExe>.exe.log" and the file
would then have a python stack trace in it showing that
"FreeSansBold.ttf" could not be found. It's possible that on 64-bit,
this problem is manifesting itself as a crash.

So assuming this is your situation, you should either not use the
default font (the best solution, in my opinion), or tell py2exe to
package the font in the right place (google and the mailing list
archives know how to do that)

However, it's entirely possible Zachary's problem is something
completely different. I would try a set of 32-bit python and extensions
to see if you get a different result.


On Mon, Nov 1, 2010 at 2:26 AM, Christoph Gohlke <cgohlke@xxxxxxx
<mailto:cgohlke@xxxxxxx>> wrote:

    The shortest script that fails with py2exe is:

    import pygame
    pygame.init()
    pygame.font.Font(None, 80)

    Christoph