Following the latest advice on python anywhere regarding using default ChromeDriver: https://help.pythonanywhere.com/pages/selenium/
I have the following code fragment:
if dev_server=='Y':
service = Service(executable_path=Path(cwd,'chromedriver.exe'))
options = webdriver.ChromeOptions()
options.add_experimental_option('excludeSwitches', ['enable-logging'])
if dev_server=='Y':
driver = webdriver.Chrome(service=service,options=options)
else:
driver = webdriver.Chrome(options=options)
NOTE dev_server is not 'Y'
I receive the following error: selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally. (unknown error: DevToolsActivePort file doesn't exist) (The process started from chrome location /usr/bin/chromium is no longer running, so ChromeDriver is assuming that Chrome has crashed.) Stacktrace: #0 0x563e173ffe89
Please explain what I am doing wrong.