mercredi 6 juillet 2016

PYInstaller-compiled exe can't find file with absolute path


I compiled my python gui with pyinstaller on Windows 10 but it seems like it cannot find my other script even though I provided the hard-coded absolute path to it (with r'"C:Program Files...script path..."'). I even tried os.isfile (script path) but it returns False. The python script was compiled with pyinstaller --onefile --windowed --icon=iconimage.ico myscript.py from the command prompt. I use this same command on Ubuntu and the binary works just fine. I read something about the pyinstaller creating a temporary directory which I found but I don't think it matters where it's running from as long as I give it the full path so I'm thinking maybe I need more options when compiling? The gui opens just fine. It's when it needs to call the script that it doesn't do anything. No errors or anything when I run it from the command prompt. Please help!

Aucun commentaire:

Enregistrer un commentaire