I am trying to get my GUI into an exe but it seems pyinstaller is not taking some folders that are needed.
Traceback (most recent call last):
File "importlib\resources.py", line 97, in open_binary
FileNotFoundError: [Errno 2] No such file or directory: 'D:\\User\\Documents\\ipfit7-app\\dist\\Main\\libratom\\data\\media_types.json'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "Main.py", line 6, in <module>
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "d:\user\documents\ipfit7-app\venv\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 491, in exec_module
exec(bytecode, module.__dict__)
File "mail\mailanalyse.py", line 3, in <module>
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "d:\user\documents\ipfit7-app\venv\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 491, in exec_module
exec(bytecode, module.__dict__)
File "mail\emails\getpst.py", line 1, in <module>
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "d:\user\documents\ipfit7-app\venv\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 491, in exec_module
exec(bytecode, module.__dict__)
File "libratom\lib\__init__.py", line 5, in <module>
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "d:\user\documents\ipfit7-app\venv\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 491, in exec_module
exec(bytecode, module.__dict__)
File "libratom\lib\pff.py", line 16, in <module>
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "d:\user\documents\ipfit7-app\venv\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 491, in exec_module
exec(bytecode, module.__dict__)
File "libratom\data\__init__.py", line 15, in <module>
File "contextlib.py", line 113, in __enter__
File "importlib\resources.py", line 201, in path
File "importlib\resources.py", line 111, in open_binary
FileNotFoundError: 'media_types.json' resource not found in 'libratom.data'
[10636] Failed to execute script Main
The librom\data folder is not in the dist\Main\ folder that gets created by pyinstaller
now you might think that that has solved my issue but the problem is that i want to use the --onefile parameter and when i do that i can't cope pase the needed folder into anywhere.
my question is if there is a way to make it include that librom\data folder.
thnx in advance. it would help a lot!