Every now and again I get an error message saying “No FDSN service could be discovered at …”. I usually just rerun my script and it works fine.
What I’m attempting to do is create a while not: loop for this error, so I only have to run the script once. The problem is I don’t know what type of error this is. I’ve written what I have at the moment below. Any help would be appreciated.
host = "RASPISHAKE" client = "" while not client: try: client = Client(host) except ValueError: print("ValueError has occured") print("Check variable 'host' to confirm client name") quit() except IOError: print("I/O Error. Rerunning") continue break