Selenium webdriver unable to restart after unexpected exit
<p>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:<br><br>
<code>brew rmtree chromedriver &amp;&amp; brew install chromedriver</code><br>
<code>pip uninstall selenium &amp;&amp; pip install selenium</code></p>

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

<p>What I'm attempting to run on the python3.5 kernel is:</p>

<pre><code>from selenium import webdriver
driver = webdriver.Chrome()
</code></pre>

<p>stacktrace:</p>

<pre><code>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
</code></pre>

<p>likewise, for Firefox:</p>

<pre><code>from selenium import webdriver
driver = webdriver.Firefox()
</code></pre>

<p>and:</p>

<pre><code>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.
</code></pre>

<p>Should I be looking for some rogue process to kill with <code>ps -e</code> and <code>kill -sigint</code>?</p>

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

python selenium selenium-webdriver selenium-chromedriver