I am trying to generate a .exe for my python app. Inside the code I import some embed files like so:
f = open('source/store/data_dictionary.json')
Trying to run the app from the generated .exe, I obtain an error like this:
FileNotFoundError: [Errno 2] No such file or directory: 'source/store/data_dictionary.json'
full output error from the console
To generate the .exe, I've run:
pyinstaller --onefile app.py
I don't know if there's a better way to import files inside a python scrip to generate executables, or if I have to write some setup.
You can check my source code here: https://github.com/GraphFilter/GraphFilter