1. When I was packing the game, the exe in dist flashes back. You can’t see what the error is.
After recording the screen with the video recorder, the error code is found as follows:
2. According to the error content, scoreboard There is a problem with line 18 of Py:
The cause of the error has been highlighted.
3. Problem-solving:
It is in the font setting “None”, can not be translated, so lead to error, change the “None” to the system font, here changed to ‘SimHei’
When checking the information, I found that other people encountered the problem: the path of the image. The relative path written is not correct, you have to write the absolute path.)
PS: At this point the game can still only be used on your own computer, also because of the picture path problem. The path on your own computer is not the same as the path on other people’s computers. To let others play too, you still have to change it.
Read More:
- [How to Solve] pyinstaller failed to execute script
- [Solved] Pyinstaller packaged exe error: “failed to execute script XXX”
- python3 Execute except Exception, e Error [How to Solve]
- Invalid python sd, Fatal Python error: init_fs_encoding: failed to get the Python cod [How to Solve]
- [Solved] Linux OS python Script Error: smtplib has no attribute SMTP_SSL
- [Solved] Pycharm Use pip Error: Script file ‘D:\Anaconda3\envs\pytorch\Scripts\pip-script.py‘ is not present
- [Solved] Vite build & Flask Error: Failed to load module script. Strict MIME type checking is enforced
- Jupyter notebook Failed to Switch to the Virual Environment: DLL load failed python.exe could not find the entry
- [Solved] opencv-python: recipe for target ‘modules/python3/CMakeFiles/opencv_python3.dir/all‘ failed
- The lenet model trained by Python failed to predict its own handwritten pictures
- How to Solve Python WARNING: Ignoring invalid distribution -ip (e:\python\python_dowmload\lib\site-packages)
- How to Solve Python Importerror: DLL load failed: unable to find the specified program using tensorflow
- Python Error: pip install mysql-connector-python failed
- Importerror: DLL load failed: unable to find the specified module in Python
- [Solved] PySide2 Failed to Create a Graphical Python Program
- Python failed to import pyx file [How to Solve]
- [Solved] NPM install Error: check python checking for Python executable python2 in the PATH
- [Solved] torchvision Error: UserWarning: Failed to load image Python extension: Could not find module
- [Solved] Failed to obtain/convert traceback after Python Tkinter packages exe
- Python Error: Failed to establish a new connection: [Errno -2] Name or service not known