sometimes happen that downloading of videos crashes on exceptions.
Traceback (most recent call last):
File "/home/olivie/.local/lib/python3.10/site-packages/urllib3/connection.py", line 174, in _new_conn
conn = connection.create_connection(
File "/home/olivie/.local/lib/python3.10/site-packages/urllib3/util/connection.py", line 72, in create_connection
for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
File "/usr/lib/python3.10/socket.py", line 955, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Temporary failure in name resolution
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/olivie/.local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 714, in urlopen
httplib_response = self._make_request(
File "/home/olivie/.local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 403, in _make_request
self._validate_conn(conn)
File "/home/olivie/.local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 1053, in _validate_conn
conn.connect()
File "/home/olivie/.local/lib/python3.10/site-packages/urllib3/connection.py", line 363, in connect
self.sock = conn = self._new_conn()
File "/home/olivie/.local/lib/python3.10/site-packages/urllib3/connection.py", line 186, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7f1413e592a0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/requests/adapters.py", line 486, in send
resp = conn.urlopen(
File "/home/olivie/.local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 798, in urlopen
retries = retries.increment(
File "/home/olivie/.local/lib/python3.10/site-packages/urllib3/util/retry.py", line 592, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='prd-tapo-care-euw1.s3.eu-west-1.amazonaws.com', port=443): Max retries exceeded with url: /19712897/2023-09-13.17-40-07.761.201973b6-37cb-4a56-86ee-8cf497b66386.1920-1080.29057.ts?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20230928T201552Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Credential=AKIA23OYBEOU7DOGUG4B%2F20230928%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Signature=f5a4eaa735bea6868e7205742751d3d21979e0be368277020d17ed2f61b6d382 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f1413e592a0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/olivie/tapo-cli/tapo-cli/tapo-cli.py", line 336, in <module>
tapo()
File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1157, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "/home/olivie/tapo-cli/tapo-cli/tapo-cli.py", line 321, in download_videos
download(url, file_path, file_name)
File "/home/olivie/tapo-cli/tapo-cli/tapo-cli.py", line 99, in download
res = requests.get(url)
File "/usr/local/lib/python3.10/dist-packages/requests/api.py", line 73, in get
return request("get", url, params=params, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/requests/api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/requests/sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.10/dist-packages/requests/sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/requests/adapters.py", line 519, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='prd-tapo-care-euw1.s3.eu-west-1.amazonaws.com', port=443): Max retries exceeded with url: /19712897/2023-09-13.17-40-07.761.201973b6-37cb-4a56-86ee-8cf497b66386.1920-1080.29057.ts?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20230928T201552Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Credential=AKIA23OYBEOU7DOGUG4B%2F20230928%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Signature=f5a4eaa735bea6868e7205742751d3d21979e0be368277020d17ed2f61b6d382 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f1413e592a0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'))
Please correct or suggest working solution.
Thank you and have a nice day.