Selenium webdriver unable to restart after unexpected exit
Question: I haven't been able to start up an instance of python's selenium webdriver
after my last use a few days ago. According to the error messages, it
unexpectedly quit last time I was using it, and now, after restarting my
macbook, uninstalling and reinstalling chromedriver/selenium:  
  
`brew rmtree chromedriver && brew install chromedriver`  
`pip uninstall selenium && pip install selenium`

I'm still in the same place. It seems to be selenium itself, because for both
Firefox and Chrome, I'm getting error messages.

What I'm attempting to run on the python3.5 kernel is:

    
    
    from selenium import webdriver
    driver = webdriver.Chrome()
    

stacktrace:

    
    
    File "/Users/myuser/webscraping/env/lib/python3.5/site-packages/selenium/webdriver/chrome/webdriver.py", 
    line 62, in __init__self.service.start()
    File "/Users/myuser/webscraping/env/lib/python3.5/site-packages/selenium/webdriver/common/service.py", 
    line 86, in start self.assert_process_still_running()
    File "/Users/myuser/webscraping/env/lib/python3.5/site-packages/selenium/webdriver/common/service.py", 
    line 99, in assert_process_still_running % (self.path, return_code)
    selenium.common.exceptions.WebDriverException: Message: Service chromedriver unexpectedly exited. Status code was: -5
    

likewise, for Firefox:

    
    
    from selenium import webdriver
    driver = webdriver.Firefox()
    

and:

    
    
    File "/Users/myuser/webscraping/env/lib/python3.5/site-packages/selenium/webdriver/firefox/webdriver.py", 
    line 80, in __init__
    self.binary, timeout)
    File "/Users/myuser/webscraping/env/lib/python3.5/site-packagesyuser/selenium/webdriver/firefox/extension_connection.py", 
    line 52, in __init__
    self.binary.launch_browser(self.profile, timeout=timeout)
    File "/Users/myuser/webscraping/env/lib/python3.5/site-packages/selenium/webdriver/firefox/firefox_binary.py", 
    line 68, in launch_browser
    self._wait_until_connectable(timeout=timeout)
    File "/Users/myuser/webscraping/env/lib/python3.5/site-packages/selenium/webdriver/firefox/firefox_binary.py", 
    line 99, in _wait_until_connectable
    "The browser appears to have exited "
    selenium.common.exceptions.WebDriverException: Message: The browser appears to have exited before we could connect. 
    If you specified a log_file in the FirefoxBinary constructor, check it for details.
    

Should I be looking for some rogue process to kill with `ps -e` and `kill
-sigint`?


Answer: I discovered that homebrew chromedriver was throwing an error related to
symlinking the correct dylib. I fixed the issue by following the steps in
[this](http://stackoverflow.com/questions/17643509/conflict-between-dynamic-
linking-priority-in-osx#answer-35070568) answer to get chromedriver running
again, which enabled selenium/chrome webdriver to work as well.

