Python Forum
How to ignore "Retrying (Retry(total=2, connect=2, read=5, redirect=5, status=None))"
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to ignore "Retrying (Retry(total=2, connect=2, read=5, redirect=5, status=None))"
#1
Hi

While running my code, I encounter this kind of warnings:

[WARNING] - Retrying (Retry(total=2, connect=2, read=5, redirect=5, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fe5bb9be630>: Failed to establish a new connection: [Errno 111] Connection refused')'
How to ignore them while logging?

import warnings
warnings.filterwarnings("ignore")
does not work as well as
logging.getLogger("urllib3").setLevel(logging.CRITICAL)
Reply
#2
show entire error (comment out the ignore statement) traceback as it contains important debugging information.
Reply
#3
(Mar-26-2022, 08:34 AM)Larz60+ Wrote: show entire error (comment out the ignore statement) traceback as it contains important debugging information.

Here it is:

2022-03-26 12:06:47,421 - [WARNING] - Retrying (Retry(total=0, connect=0, read=5, redirect=5, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fe5bb98a080>: Failed to establish a new connection: [Errno 111] Connection refused')': /
2022-03-26 12:06:47,422 - clearml.storage - ERROR - Exception encountered while uploading HTTPConnectionPool(host='koala02.ftc.ru', port=8081): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fe5bb98a208>: Failed to establish a new connection: [Errno 111] Connection refused'))
2022-03-26 12:06:47,422 - clearml.metrics - WARNING - Failed uploading to http://koala02.ftc.ru:8081 (HTTPConnectionPool(host='koala02.ftc.ru', port=8081): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fe5bb98a208>: Failed to establish a new connection: [Errno 111] Connection refused')))
2022-03-26 12:06:47,423 - [WARNING] - Retrying (Retry(total=2, connect=2, read=5, redirect=5, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fe5bb98a6a0>: Failed to establish a new connection: [Errno 111] Connection refused')': /
2022-03-26 12:06:47,424 - [WARNING] - Retrying (Retry(total=1, connect=1, read=5, redirect=5, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fe5bb98a898>: Failed to establish a new connection: [Errno 111] Connection refused')': /
2022-03-26 12:06:47,424 - [WARNING] - Retrying (Retry(total=0, connect=0, read=5, redirect=5, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fe5bb98aa20>: Failed to establish a new connection: [Errno 111] Connection refused')': /
2022-03-26 12:06:47,425 - clearml.storage - ERROR - Exception encountered while uploading HTTPConnectionPool(host='koala02.ftc.ru', port=8081): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fe5bb98aba8>: Failed to establish a new connection: [Errno 111] Connection refused'))
2022-03-26 12:06:47,425 - clearml.metrics - WARNING - Failed uploading to http://koala02.ftc.ru:8081 (HTTPConnectionPool(host='koala02.ftc.ru', port=8081): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fe5bb98aba8>: Failed to establish a new connection: [Errno 111] Connection refused')))
2022-03-26 12:06:47,425 - clearml.metrics - ERROR - Not uploading 2/2 events because the data upload failed
Reply
#4
They aren't getting an error, they just want to turn the logging off for the retries.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Good way to ignore case when searching elements? Winfried 1 153 Apr-25-2024, 12:39 PM
Last Post: menator01
  redirect STDIO in the Python code Skaperen 6 1,301 Jul-05-2023, 12:23 AM
Last Post: Skaperen
Question Use function, retry until valid Ashcora 8 1,473 Jan-06-2023, 10:14 AM
Last Post: Ashcora
  Ignore WakeWord after it's said Extra 2 1,200 Apr-01-2022, 12:32 AM
Last Post: Extra
  stderr redirect to file fmr300 2 3,597 Apr-03-2021, 01:31 AM
Last Post: fmr300
  requests_futures.sessions retry list of HTTP 429 Johanoosterwaal 0 1,570 Nov-20-2020, 09:23 PM
Last Post: Johanoosterwaal
  Cannot redirect print to a file tester_V 3 2,528 Sep-11-2020, 12:21 AM
Last Post: tester_V
  Retry After Exception Harshil 2 2,265 Aug-09-2020, 05:32 PM
Last Post: Harshil
  redirect url_for passing arguments with the url Leon79 1 1,658 Jul-09-2020, 05:20 PM
Last Post: Leon79
  Ignore first few letters of a line when reading file. ShakeyPakey 16 6,471 May-30-2020, 02:17 PM
Last Post: BitPythoner

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020