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.
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.
- Python recursively traverses all files in the directory to find the specified file
- How to Solve Python Xlwt ValueError: More than 4094 XFs (styles)
- [Solved] Python opencv imshow Error: Assertion failed (size.width＞0 && size.height＞0) in cv::imshow
- Python Error: OSError: cannot open resource [How to Solve]
- Python 3 uses the relative path import module
- [Solved] Python Relative Reference Error: ImportError: attempted relative import with no known parent package
- The lenet model trained by Python failed to predict its own handwritten pictures
- [Solved] Pygame.error: mixer not initialized & pygame.error: WASAPI can‘t find requested audio endpoint: Could not Find the Element.
- RuntimeWarning: overflow encountered in ubyte_Scalars pixel addition and subtraction overflow exception
- [Solved] RuntimeError: The size of tensor a (4) must match the size of tensor b (3) at non-singleton dim
- Ctypes DLL Error: FileNotFoundError: Could not find module ‘***_dll.dll‘ (or one of its dependencies).
- Python Import Error: SystemError: Parent module ‘‘ not loaded, cannot perform relative import
- Python FileNotFoundError: [Errno 2] No such file or directory: ‘objects/epsilon.pkl
- The solution of no such file or directory and cannot load native module running error of python3 pyinstaller after packaging
- [CHM] Python: How to Extract CHM Data
- Python Error: SyntaxError: (unicode error) ‘unicodeescape‘ codec can‘t decode bytes in position 2-3:
- Python: How to get the size of the picture (byte/kb/mb)
- Decode PUP data Error when reading radar data [How to Solve]
- Python Error: _csv.Error sequence expected