Can't open webdriver selenium easy in digital ocean server

Posted January 10, 2019 4.1k views
PythonUbuntu 16.04

easy code not work selenium

# This Python file uses the following encoding: utf-8

import time
import random
from selenium import webdriver
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.common.keys import Keys
from import Options 
from pyvirtualdisplay import Display

driver = webdriver.Chrome(executable_path='/usr/bin/chromedriver')

link = ""

have mistake console

Traceback (most recent call last):
  File "", line 27, in <module>
    driver = webdriver.Chrome(executable_path='/usr/bin/chromedriver')
  File "/var/venv/lib/python3.5/site-packages/selenium/webdriver/chrome/", line 69, in __init__
  File "/var/venv/lib/python3.5/site-packages/selenium/webdriver/remote/", line 92, in __init__
    self.start_session(desired_capabilities, browser_profile)
  File "/var/venv/lib/python3.5/site-packages/selenium/webdriver/remote/", line 179, in start_session
    response = self.execute(Command.NEW_SESSION, capabilities)
  File "/var/venv/lib/python3.5/site-packages/selenium/webdriver/remote/", line 236, in execute
  File "/var/venv/lib/python3.5/site-packages/selenium/webdriver/remote/", line 192, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally
  (Driver info: chromedriver=2.9.248304,platform=Linux 4.4.0-140-generic x86_64)

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

Hey friend,

I found another person who experienced a similar error, and someone offered an answer that appeared to work for them: