Python Forum

Full Version: pygame exe crashes
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello, could anyone tell me why my compiled app crashes upon start if I use these lines?

font = pygame.font.SysFont(None, 100)
text = font.render("COLLISION!!!!", True, BLACK)
screen.blit(text,(centerX - text.get_width() / 2, centerY - text.get_height() / 2))


I deleted these lines and now compiled exe runs fine...
Your issue is with SysFont. Add a font to your package and use that instead.

You can also try
font = pygame.font.SysFont('Sans', 100)