Reputation: 45
chromedriver.exe file is in the folder it works.
the version is 80.0.3987.116. also the chrome's version is 80.0.3987.116.
driver = webdriver.Chrome()
this doesn't work. with that error message.
WebDriverException: Message: unknown error: DevToolsActivePort file doesn't exist
I thought this error is because of updating chrome hours ago
Then I changed my code with chromeoptions
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument("--headless")
chrome_options.add_argument("--no-sandbox")
chrome_options.add_argument('--disable-dev-shm-usage')
chrome_options.add_argument("--remote-debugging-port=9222")
driver = webdriver.Chrome('chromedriver', options= chrome_options)
also doesn't work with another error.
SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 80
The version is matched with chrome version.
I tried installing a different version of chromedriver and got the same error.
SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 79
how can i fix it?
Upvotes: 3
Views: 3941
Reputation: 29
I solved this error by updating the Chrome Webdriver version using - https://chromedriver.storage.googleapis.com/index.html?path=80.0.3987.106/ hope it helps !! Thanks.
Upvotes: 0
Reputation: 193088
This error message...
SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 80
...implies that the ChromeDriver v80 was unable to initiate/spawn a new Browsing Context i.e. Chrome Browser where is version is other then 80.0.
Your main issue is the incompatibility between the version of the binaries you are using as follows:
So, it's quite evident your have other versions of ChromeDriver other then chromedriver=81.0 present within your system and is present within the system PATH
variable which gets invoked while you:
driver = webdriver.Chrome()
The easiest solution will be to override the default chromedriver binary location with chromedriver v80.0 binary location as follows:
from selenium import webdriver
driver = webdriver.Chrome(executable_path='/path/to/chromedriver')
driver.get('http://google.com/')
You can find a couple of relevant discussions in:
Upvotes: 1