I'm running Python Selenium Script, and sometimes, when the internet connexion is not working i got 2 types of errors :
timeout: Timed out receiving message from renderer: 300.000
unknown error: net::ERR_PROXY_CONNECTION_FAILED
So i want to make this; each time one of those 2 errors appears, run another script i have on my laptop
Here is the concerned part of my code:
except Exception as e:
print(e)
line_count += 1
if "Timed out" in e:
os.system(r"C:\Users\SAMSUNG\script.py")
print("Done")
pass
else:
print("Not Concerned Error")
pass
if "ERR_PROXY" in e:
os.system(r"C:\Users\SAMSUNG\script.py")
print("Done")
pass
else:
print("Not Concerned Error")
pass
But it doesn't work! Here is my error:
if "Timed out" in e:
TypeError: argument of type 'TimeoutException' is not iterable