K
K
Konstantin2021-06-09 17:26:17
Building projects
Konstantin, 2021-06-09 17:26:17

Compiled py via Pyinstaller can't find file?

The game (the one with the error, on pygame) consists of a main.py and a resources folder where all the important textures and files are located. When you run the code everything works fine. But the compiled exe says that it does not see the file. Fortunately, I still have the previous versions of the game, but I did not notice any differences in the import of files, or in the exe file.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
Konstantin, 2021-06-17
@Fire_Fall

I solved the problem by changing --onefile to --onedir.

K
Kotar4ik, 2021-06-10
@Kotar4ik

Was relative path used in the file path?
Have you added the resource folder itself to the .exe folder?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question