I run a Python script that runs for a couple of hours and then throws the below error. I understand it states a connection issue but if that is the case, the connection would have fallen through in the initial runs itself. Is there a way that I could avoid this error.
Traceback (most recent call last):
File "C:\Users\s5331866\AppData\Local\Continuum\anaconda3\lib\site-packages\urllib3\connection.py", line 141, in _new_conn(self.host, self.port), self.timeout, **extra_kw)
File "C:\Users\s5331866\AppData\Local\Continuum\anaconda3\lib\site-packages\urllib3\util\connection.py", line 83, in create_connection
raise err
File "C:\Users\s5331866\AppData\Local\Continuum\anaconda3\lib\site-packages\urllib3\util\connection.py", line 73, in create_connection
sock.connect(sa)
TimeoutError: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond