Even encapsulating inside a try except when I go to refresh a page, this error below is printed in the terminal, as if it were completely ignored by the try except, I would like to know if there is a way to specifically suppress this error without having to completely suppress all connection errors when creating the webdriver: Traceback (most recent call last): File "C:\Users\Computador\AppData\Local\Programs\Python\Python310\lib\site-packages\seleniumwire\thirdparty\mitmproxy\net\tcp.py", line 94, in write r = self.o.write(v) File "C:\Users\Computador\AppData\Local\Programs\Python\Python310\lib\socket.py", line 723, in write return self._sock.send(b) ConnectionAbortedError: [WinError 10053] An established connection was aborted by software on the host computer During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\Computador\AppData\Local\Programs\Python\Python310\lib\site-packages\seleniumwire\thirdparty\mitmproxy\server\server.py", line 113, in handle root_layer() File "C:\Users\Computador\AppData\Local\Programs\Python\Python310\lib\site-packages\seleniumwire\thirdparty\mitmproxy\server\modes\http_proxy.py", line 23, in __call__ layer() File "C:\Users\Computador\AppData\Local\Programs\Python\Python310\lib\site-packages\seleniumwire\thirdparty\mitmproxy\server\protocol\tls.py", line 285, in __call__ layer() File "C:\Users\Computador\AppData\Local\Programs\Python\Python310\lib\site-packages\seleniumwire\thirdparty\mitmproxy\server\protocol\http1.py", line 100, in __call__ layer() File "C:\Users\Computador\AppData\Local\Programs\Python\Python310\lib\site-packages\seleniumwire\thirdparty\mitmproxy\server\protocol\http.py", line 206, in __call__ if not self._process_flow(flow): File "C:\Users\Computador\AppData\Local\Programs\Python\Python310\lib\site-packages\seleniumwire\thirdparty\mitmproxy\server\protocol\http.py", line 288, in _process_flow return self.handle_upstream_connect(f) File "C:\Users\Computador\AppData\Local\Programs\Python\Python310\lib\site-packages\seleniumwire\thirdparty\mitmproxy\server\protocol\http.py", line 251, in handle_upstream_connect self.send_response(f.response) File "C:\Users\Computador\AppData\Local\Programs\Python\Python310\lib\site-packages\seleniumwire\thirdparty\mitmproxy\server\protocol\http.py", line 54, in send_response self.send_response_body(response, [response.data.content]) File "C:\Users\Computador\AppData\Local\Programs\Python\Python310\lib\site-packages\seleniumwire\thirdparty\mitmproxy\server\protocol\http1.py", line 72, in send_response_body self.client_conn.wfile.write(chunk) File "C:\Users\Computador\AppData\Local\Programs\Python\Python310\lib\site-packages\seleniumwire\thirdparty\mitmproxy\net\tcp.py", line 98, in write raise exceptions.TcpDisconnect(str(e)) seleniumwire.thirdparty.mitmproxy.exceptions.TcpDisconnect: [WinError 10053] An established connection was aborted by software on the host computer My code: driver = create_webdrivers.web_driver( timeout=3, proxy_string=create_webdrivers.PROXY_FILE, enable_javascript=True ) driver.get("https://example.com/") try: driver.refresh() except seleniumwire.thirdparty.mitmproxy.exceptions.TcpDisconnect as e: pass Create webdriver file: from os import path from typing import Optional from selenium.webdriver.firefox.options import Options from selenium.webdriver.firefox.service import Service from seleniumwire import webdriver USER_AGENT = 'my_user_agent.txt' PROXY_FILE = open('proxy.txt').read().strip() def get_local_user_agent() -> str: with open(USER_AGENT) as f: my_user_agent = f.read() return my_user_agent def _create_base_options(enable_javascript: bool, headless: bool) -> Options: options = Options() options.set_preference("general.useragent.override", get_local_user_agent()) options.set_preference("media.volume_scale", "0.0") options.set_preference("network.cookie.cookieBehavior", 2) options.page_load_strategy = 'eager' if headless: options.add_argument('--headless') options.set_preference('javascript.enabled', enable_javascript) return options def web_driver(timeout: int, proxy_string: Optional[str], enable_javascript: bool, headless: bool=True) -> webdriver.Firefox: service = Service(log_path=path.devnull) options = _create_base_options(enable_javascript=enable_javascript, headless=headless) seleniumwire_options = {} if proxy_string: ip, port, user, password = proxy_string.split(":") proxy_url = f"http://{user}:{password}@{ip}:{port}" seleniumwire_options = { "proxy": { "http": proxy_url, "https": proxy_url, } } driver = webdriver.Firefox(options=options, service=service, seleniumwire_options=seleniumwire_options) if timeout != 0: driver.set_page_load_timeout(timeout) return driver Note: Even if I put except Exception as e: for test the error is still printed Continue reading...