exe runs from command line but not when double clicked

150 views
Skip to first unread message

Dirk Marchant

unread,
Jan 23, 2020, 3:23:52 PM1/23/20
to PyInstaller
I made a .exe using pyinstaller.  The .exe runs from the command line but when I double click the file in Windows Explorer I get the error: Failed to execute script.  Why would the program run one way but not the other?

M. Agus Setiadi

unread,
Jan 24, 2020, 4:19:36 AM1/24/20
to pyins...@googlegroups.com
Hi,

How do you use pyinstaller for generating exe files?
I suggest to wrap the code using try except and log the error if possible.

Thanks

Pada tanggal Jum, 24 Jan 2020 pukul 03.23 Dirk Marchant <seedi...@gmail.com> menulis:
I made a .exe using pyinstaller.  The .exe runs from the command line but when I double click the file in Windows Explorer I get the error: Failed to execute script.  Why would the program run one way but not the other?

--
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 pyinstaller...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/ccfb03b1-16a3-4eb7-82d9-524e4ce9f1e3%40googlegroups.com.

Dirk Marchant

unread,
Jan 28, 2020, 5:05:59 AM1/28/20
to PyInstaller
Fixed.  I changed the .spec file to run windowed (not one file), then wrote a batch file with the program name and "pause".  I was able to see the error then (which was a missing path in the .spec file) and fix it.


On Friday, January 24, 2020 at 1:19:36 AM UTC-8, M. Agus Setiadi wrote:
Hi,

How do you use pyinstaller for generating exe files?
I suggest to wrap the code using try except and log the error if possible.

Thanks

Pada tanggal Jum, 24 Jan 2020 pukul 03.23 Dirk Marchant <seedi...@gmail.com> menulis:
I made a .exe using pyinstaller.  The .exe runs from the command line but when I double click the file in Windows Explorer I get the error: Failed to execute script.  Why would the program run one way but not the other?

--
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 pyins...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages