~~Running Python Script on Startup That Opens Chrome Causing Unexpected Problems~~ SOLVED Multi-threading
Turns out webbrowser "blocks" waiting for an exit response from the browser. There is no way to make a non-block call. Use multi threading to run the open as a separate task.
Edit: Make sure to use try on webbrowser since it returns a connect timeout error by default if the windows is not closed. Except then raise if you really want to see the error.
I am running a python script that runs on startup of Windows 10 due to a shortcut of it being in the startup folder. This script is checking constantly for requirements on whether or not to open a web-page. If a page is launched and chrome has not previously been closed (yes closed, not just opened), the program just "dies" and freezes. After debugging my program the loop is no longer running, reading and writing to files stops, and even if another web-page should open ... it doesn't. I'm guessing this is a Chrome issue or a problem with this code windowsChromePath = 'C:/Program Files (x86)/Google/Chrome/Application/chrome.exe %s'
webbrowser.get(windowsChromePath).open(url)
Anyone know why this could be?
Edit: Forgot to mention I have had problems in this same project with read and write. Debugging leads me to believe it's not this, however if you think it could be a read/write problem it might be