Error in --add-data Parameter

19 views
Skip to first unread message

Momen Mawad

unread,
Sep 6, 2020, 2:43:37 PM9/6/20
to PyInstaller
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. 
Reply all
Reply to author
Forward
0 new messages