title: Python selenium: WinError 10053 - host is shutting connection down
body: <p>I started messing around with Python networking using selenium on Firefox. Unfortunately, I keep getting "<strong>ConnectionAbortedError</strong>: [WinError 10053] An established connection was aborted by the software in your host machine". </p>
  
  <p>However, this only happens when running <em>some</em> commands, and it only happens the first time I run them. If execute the command a second time right after that, it works. (See below for a minimal example.)</p>
  
  <p>I found <a href="https://stackoverflow.com/questions/1472876/why-is-host-aborting-connection" title="First Link">this question</a>, but being a networking newbie I'm having a hard time applying the solution to my situation. <strong>How do I prevent the connection from shutting down?</strong></p>
  
  <p>Any help is greatly appreciated!</p>
  
  <pre class="lang-py prettyprint-override"><code>from selenium import webdriver
  
  browser = webdriver.Firefox()
  browser.get('http://www.google.com/')
  
  searchfield = browser.find_element_by_id("lst-ib")  # Runs without issues
  searchfield.get_attribute("value")  # Produces WinError 10053
  searchfield.get_attribute("value")  # Returns '' as it should
  </code></pre>
  
  <p><strong>EDIT:</strong> It seems the error only occurs, when I execute the command in the shell, rather than saving and running the whole script. Nonetheless, it's pretty annoying.</p>