Chi-Chuan Huang
Chi-Chuan Huang

Reputation: 1

ChromeDriverManager().install() occurs TimeoutError and no response

I am using selenium and ChromeDriverManager to get the last chrome driver automatic as follow code.

    try:
        #print("ChromeDriverManager().install():" + ChromeDriverManager().install())
        driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()), options=chrome_options)
    except Exception as e:
        print (f"Error: {e}")
        return

It's works before, but someday it's not workable. script will hang in the ChromeDriverManager().install() until I keyboard interrupt it, and I saw the error message as below

Traceback (most recent call last):
  File "C:\Python310\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

I tried to change to firefox, but the symptom is the same. But I found the same script works normally on my laptop...I think it maybe simething IT block the connect port, how could I know the ChromeDriverManager().install() connect address? Or any idea to fix it?

Upvotes: 0

Views: 144

Answers (1)

kaliiiiiiiii
kaliiiiiiiii

Reputation: 1135

You can find the the chromedriver file url's for newer versions at googlechromelabs.github.io/chrome-for-testing/known-good-versions-with-downloads.json.

The same issue you've got is mentioned at issue

I believe it's not related to webdriver_manager because in the exception it's saying Failed to establish a new connection which means your proxy is blocking the website to download

therefore the assumption is that you either

  1. have set a bad proxy
    or
  2. your instance doesn't have access to the internet
    or
  3. your instance for some other reason blocks the request

Upvotes: 0

Related Questions