Hopefully, there's a simple solution to my problem. I have a Python tkinter application and all is working as expected. I used the following command to generate a standalone exe file for distribution.
"C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\Scripts\pyinstaller" -w -F --i "theIcon.ico" "myappsource.py"
The executable worked just as expected. However, I realized that I had forgotten to put an icon in the upper left corner of my window. After a little online research, I determined that the following line had to be added to my code (note that I want the application icon and the upper left corner icon to be the same):
root.wm_iconbitmap('theIcon.ico')
With this being the only change, I ran the application in Visual Studio and it worked as expected, inserting the icon in the upper left corner. However, when I re-compiled the app using the same command as I used before, the application now will not run. I get a popup window titled "Fatal Error!" with "Failed to execute script myappsource" as the message. I've tried with and without the root.wm_iconbitmap line several times - one way it works, the other it doesn't. Any suggestions? Thanks