-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
Description
Description
Yesterday, I was using Selenium at work, and it worked perfectly.
Today, I tried to run my project and got the following exception:
Exception has occurred: ConnectionError
Could not reach host. Are you offline?
socket.gaierror: [Errno 11001] getaddrinfo failed
The above exception was the direct cause of the following exception:
urllib3.exceptions.NameResolutionError: <urllib3.connection.HTTPSConnection object at 0x00000230627F2BA0>: Failed to resolve 'msedgedriver.azureedge.net' ([Errno 11001] getaddrinfo failed)
The above exception was the direct cause of the following exception:
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='msedgedriver.azureedge.net', port=443): Max retries exceeded with url: /LATEST_RELEASE_138_WINDOWS (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x00000230627F2BA0>: Failed to resolve 'msedgedriver.azureedge.net' ([Errno 11001] getaddrinfo failed)"))
During handling of the above exception, another exception occurred:
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='msedgedriver.azureedge.net', port=443): Max retries exceeded with url: /LATEST_RELEASE_138_WINDOWS (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x00000230627F2BA0>: Failed to resolve 'msedgedriver.azureedge.net' ([Errno 11001] getaddrinfo failed)"))
During handling of the above exception, another exception occurred:
File "C:\Endorsement-Monitoring.Core\src\core\browser.py", line 12, in iniciar_navegador
service = Service(EdgeChromiumDriverManager().install())
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "C:\Endorsement-Monitoring.Core\__main__.py", line 22, in main
driver = iniciar_navegador()
File "C:\Endorsement-Monitoring.Core\__main__.py", line 274, in <module>
main()
~~~~^^
requests.exceptions.ConnectionError: Could not reach host. Are you offline?
I was connected to my Wi-Fi, didn't change any DNS or IP settings, didn't modify my code, and was using version 4.33.0.
First of all, I tried using pip to upgrade Selenium and see if there was a new release (and there was). So I installed version 4.34.2, but unfortunately, without success.
I decided to check the URL used in the WebDriverManager library and tried to ping or access it directly, but it seems to be down, as you can see in the images below.




Can you help me? This process is very important for my job. At the very least, I can fix it by downloading and saving the driver manually in a local folder.
Reproducible Code
from selenium import webdriver
from selenium.webdriver.edge.service import Service
from selenium.webdriver.edge.options import Options
from webdriver_manager.microsoft import EdgeChromiumDriverManager
def iniciar_navegador(headless=False):
options = Options()
if headless:
options.add_argument("--headless")
options.add_argument("--start-maximized")
service = Service(EdgeChromiumDriverManager().install())
return webdriver.Edge(service=service, options=options)
ℹ️ Last known working version: 4.33.0