I've been using python with selenium for quite some time now,but suddenly there's this error I'm getting while using the headless version of chrome driver.
This is the sample from the code ive been using;
from selenium import webdriver
chrome_options = Options()
chrome_options.add_argument("--headless")
driver = webdriver.Chrome(executable_path='/usr/local/bin/chromedriver',chrome_options=chrome_options)
###Function that my code does###
driver.quit()
The Error that I'm getting is :
browser = webdriver.Chrome(executable_path='/usr/local/bin/chromedriver',chrome_options=chrome_options)
File "/usr/local/lib/python2.7/site-packages/selenium/webdriver/chrome/webdriver.py", line 73, in __init__
self.service.start()
File "/usr/local/lib/python2.7/site-packages/selenium/webdriver/common/service.py", line 98, in start
self.assert_process_still_running()
File "/usr/local/lib/python2.7/site-packages/selenium/webdriver/common/service.py", line 111, in assert_process_still_running
% (self.path, return_code)
selenium.common.exceptions.WebDriverException: Message: Service /usr/local/bin/chromedriver unexpectedly exited. Status code was: 1
Now I tried to find a solution through google but ended up with results that said to place the chromedriver in path and define that path in the python code itself.But all those things are already done, What silly mistake am I doing here?