chrome driver 打开出错: socket.error: [Errno 10054]

长时间没有用chromedriver做一点小功能了,然后打开之前的脚本就出下面的错误:


Traceback (most recent call last):
  File "D:/data/projects/myprojects/selenium_test/chrome_test/chrome_driver_test.py", line 52, in
    test2()
  File "D:/data/projects/myprojects/selenium_test/chrome_test/chrome_driver_test.py", line 37, in test2
    driver.get("https://www.baidu.com")
  File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 213, in get
    self.execute(Command.GET, {'url': url})
  File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 199, in execute
    response = self.command_executor.execute(driver_command, params)
  File "C:\Python27\lib\site-packages\selenium\webdriver\remote\remote_connection.py", line 395, in execute
    return self._request(command_info[0], url, body=data)
  File "C:\Python27\lib\site-packages\selenium\webdriver\remote\remote_connection.py", line 426, in _request
    resp = self._conn.getresponse()
  File "C:\Python27\lib\httplib.py", line 1136, in getresponse
    response.begin()
  File "C:\Python27\lib\httplib.py", line 453, in begin
    version, status, reason = self._read_status()
  File "C:\Python27\lib\httplib.py", line 409, in _read_status
    line = self.fp.readline(_MAXLINE + 1)
  File "C:\Python27\lib\socket.py", line 480, in readline
    data = self._sock.recv(self._rbufsize)
socket.error: [Errno 10054] 


可以去下载最新版本的chromedriver.exe版本,我这里是2.27,然后就正常了。








你可能感兴趣的:(chrome driver 打开出错: socket.error: [Errno 10054])