selenium打不开chrome

selenium打不开chrome,出现下面的报错

requests.exceptions.ChunkedEncodingError: ("Connection broken: ConnectionResetError(10054, '远程主机强迫关闭了一个现有的连接。', None, 10054, None)", ConnectionResetError(10054, '远程主机强迫关闭了一个现有的连接。', None, 10054, None)

原来是之前为了FQ移动了chrome的路径

from selenium import webdriver
options = webdriver.ChromeOptions()
options.binary_location='C:\Program Files\Google\Chrome\Application\chrome.exe'
driver=webdriver.Chrome(chrome_options = options)

加入二进制chrome的路径,问题解决

猜你喜欢

转载自www.cnblogs.com/z-x-y/p/9030533.html