Hi all,
I bundled my exe file using this command:
pyinstaller --onefile main.py
The exe file was bundled succefully but gave me a runti,e error. After checking the logs it showed me this error:
File "c:\users\user\documents\python\rhymer\venv\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 341, in get_data
with open(path, 'rb') as fp:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\User\\AppData\\Local\\Temp\\_MEI97962\\cmudict\\VERSION'
[13072] Failed to execute script main
So I tried to fix the problem by running the following line:
PyInstaller --add-data=C:\Users\User\Documents\Python\Rhymer\venv\lib\site-packages\cmudict\VERSION:cmudict main.py
which provided the following error in console:
pyinstaller: error: argument --add-data: invalid add_data_or_binary value: 'C:\\Users\\User\\Documents\\Python\\Rhymer\\venv\\lib\\site-packages\\cmudict\\VERSION:cmudict'
Please help me, I couldn't find a clear answer anywhere.