If you are converting a .pyw
file, then PyInstaller will only show the game window when you will run it.
If you want to convert a .py
file, it will also show the Command Prompt.
If you are getting an error in the form of a message box, that means that an error has stopped your code. Because you converted a .pyw
file, the error will not be shown in the Command Prompt. A message box will appear instead.
To see what was the error in a more explicit way, you can:
1. Convert your file from .py
to .exe
to see the error in the Command Prompt instead of in a message box.
Then, you can record your screen and see what was the error.

2. Show the message box by yourself
Before converting your file, edit it like that:
from tkinter.messagebox import showerror
try:
# your ENTIRE code here
except Exception as error:
showerror('Error detected', error)
This way the error will be shown in a Tkinter message box like that:

Common errors:
- You forgot to put an image in the
.exe
directory
pygame.font.SysFont
does not work: use pygame.font.Font
instead and use a .ttf
file (more information here)
exit()
is not recognised, use quit()
instead (why exit()
is deprecated)