I am trying to create a webcrawler using Selenium, but I get this error when I try to create the webdriver object.
selenium.common.exceptions.SessionNotCreatedEx
I encountered the same problem. I tried installing a downgraded version of Chrome (current stable was 74 and the driver required chrome version must be between 70-73) but I wasn't able to do so.
I found another way. This link will show you which version is compatible with your current google-chrome (to know your version the command is google-chrome --version
)
This link will guide you as to how to install chrome driver with zip file. The commands are:
cd
wget
unzip chromedriver_linux64.zip
sudo mv chromedriver /usr/bin/chromedriver
sudo chown root:root /usr/bin/chromedriver
sudo chmod +x /usr/bin/chromedriver
In case the error comes No such file or directory: '/usr/lib/chromium-browser/chromedriver'
OR the same error persists
Repeat the above procedure with the path /usr/lib/chromium-browser/chromedriver
instead of /usr/bin/chromedriver
For me, google-chrome version 74 worked with ChromeDriver version 73