title: Selenium Chromedriver Error Loading Profile
body: <p>I am trying to load a user profile to chromedriver. It pops up a browser window with the right profile, but then crashes before it loads the web page.  I've attached the code and the vague error message.  Can you please let me know what I'm doing wrong?  I've searched stackoverflow and it seems like this should work.  Thank you!</p>
  
  <pre><code>chromeOptions = webdriver.ChromeOptions()
  chromeOptions.add_argument("user-data-dir=C:\Users\ABC\AppData\Local\Google\Chrome\User Data") 
  browser = webdriver.Chrome(executable_path=chromedriverdir, chrome_options=chromeOptions)
  browser.get('https://www.yahoo.com')
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>WebDriverException                        Traceback (most recent call last)
  &lt;ipython-input-4-b1d95c22d006&gt; in &lt;module&gt;()
       23 #chromeOptions.add_argument('window-size=1920x1200')
  ---&gt; 25 browser = webdriver.Chrome(executable_path=chromedriverdir, chrome_options=chromeOptions)
       26 browser.get('https://www.yahoo.com')
  
  C:\ProgramData\Anaconda2\lib\site-packages\selenium\webdriver\chrome\webdriver.pyc in __init__(self, executable_path, port, chrome_options, service_args, desired_capabilities, service_log_path)
       67                 command_executor=ChromeRemoteConnection(
       68                     remote_server_addr=self.service.service_url),
  ---&gt; 69                 desired_capabilities=desired_capabilities)
       70         except Exception:
       71             self.quit()
  
  C:\ProgramData\Anaconda2\lib\site-packages\selenium\webdriver\remote\webdriver.pyc in __init__(self, command_executor, desired_capabilities, browser_profile, proxy, keep_alive, file_detector)
       96             warnings.warn("Please use FirefoxOptions to set browser profile",
       97                           DeprecationWarning)
  ---&gt; 98         self.start_session(desired_capabilities, browser_profile)
       99         self._switch_to = SwitchTo(self)
      100         self._mobile = Mobile(self)
  
  C:\ProgramData\Anaconda2\lib\site-packages\selenium\webdriver\remote\webdriver.pyc in start_session(self, capabilities, browser_profile)
      186         parameters = {"capabilities": w3c_caps,
      187                       "desiredCapabilities": capabilities}
  --&gt; 188         response = self.execute(Command.NEW_SESSION, parameters)
      189         if 'sessionId' not in response:
      190             response = response['value']
  
  C:\ProgramData\Anaconda2\lib\site-packages\selenium\webdriver\remote\webdriver.pyc in execute(self, driver_command, params)
      254         response = self.command_executor.execute(driver_command, params)
      255         if response:
  --&gt; 256             self.error_handler.check_response(response)
      257             response['value'] = self._unwrap_value(
      258                 response.get('value', None))
  
  C:\ProgramData\Anaconda2\lib\site-packages\selenium\webdriver\remote\errorhandler.pyc in check_response(self, response)
      192         elif exception_class == UnexpectedAlertPresentException and 'alert' in value:
      193             raise exception_class(message, screen, stacktrace, value['alert'].get('text'))
  --&gt; 194         raise exception_class(message, screen, stacktrace)
      195 
      196     def _value_or_default(self, obj, key, default):
  
  WebDriverException: Message: unknown error: DevToolsActivePort file doesn't exist
    (Driver info: chromedriver=2.39.562718 (9a2698cba08cf5a471a29d30c8b3e12becabb0e9),platform=Windows NT 10.0.17134 x86_64)
  </code></pre>