You need to read up on what --onefile actually does to understand why it’s 
looking in such an obscure corner of your PC. 

PyInstaller doesn’t collect data files by default - you need to use the 
--add-data option to explicitly add each one (note the very specific syntax 
--add-data=./Config.json:.). You also should read up on using __file__ to 
locate data files at run time. Your code would break even without 
PyInstaller if you ran it from a different directory. Once you’ve done that 
you can then see the docs 
<https://pyinstaller.readthedocs.io/en/stable/runtime-information.html#using-file>
 
for using __file__ in PyInstaller. 

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/584da711-8654-4dfa-b79d-abcf599bc526n%40googlegroups.com.

Reply via email to