title: Using Selenium on Python to operate Tor. Doesn't work for unknown reasons
body: <p>From this website
  <a href="http://www.thedurkweb.com/automated-anonymous-interactions-with-websites-using-python-and-tor/" rel="nofollow noreferrer">http://www.thedurkweb.com/automated-anonymous-interactions-with-websites-using-python-and-tor/</a></p>
  
  <p>I did the following code</p>
  
  <pre><code>enter code here
  
  import stem.process
  from stem import Signal
  from stem.control import Controller
  from splinter import Browser
  
  proxyIP = "127.0.0.1"
  proxyPort = 9150
  
  proxy_settings = {"network.proxy.type": 1,
                "network.proxy.ssl": proxyIP,
                "network.proxy.ssl_port": proxyPort,
                "network.proxy.socks": proxyIP,
                "network.proxy.socks_port": proxyPort,
                "network.proxy.socks_remote_dns": True,
                "network.proxy.ftp": proxyIP,
                "network.proxy.ftp_port": proxyPort
                }
  browser = Browser('firefox', profile_preferences=proxy_settings)
  browser.visit("http://www.icanhazip.com")
  </code></pre>
  
  <p>Didn't work. Just get these errors</p>
  
  <p>Traceback (most recent call last):
    File "C:\Users\User\AppData\Local\Programs\Python\Python35-32\lib\site-packages\selenium\webdriver\common\service.py", line 74, in start
      stdout=self.log_file, stderr=self.log_file)
    File "C:\Users\User\AppData\Local\Programs\Python\Python35-32\lib\subprocess.py", line 947, in <strong>init</strong>
      restore_signals, start_new_session)
    File "C:\Users\User\AppData\Local\Programs\Python\Python35-32\lib\subprocess.py", line 1224, in _execute_child
      startupinfo)
  FileNotFoundError: [WinError 2] The system cannot find the file specified</p>
  
  <p>During handling of the above exception, another exception occurred:</p>
  
  <p>Traceback (most recent call last):
    File "C:/Users/User/PycharmProjects/LittleBot/Main.py", line 15, in 
      browser = Browser('firefox', profile_preferences=proxy_settings)
    File "C:\Users\User\AppData\Local\Programs\Python\Python35-32\lib\site-packages\splinter\browser.py", line 63, in Browser
      return driver(*args, **kwargs)
    File "C:\Users\User\AppData\Local\Programs\Python\Python35-32\lib\site-packages\splinter\driver\webdriver\firefox.py", line 48, in <strong>init</strong>
      timeout=timeout)
    File "C:\Users\User\AppData\Local\Programs\Python\Python35-32\lib\site-packages\selenium\webdriver\firefox\webdriver.py", line 140, in <strong>init</strong>
      self.service.start()
    File "C:\Users\User\AppData\Local\Programs\Python\Python35-32\lib\site-packages\selenium\webdriver\common\service.py", line 81, in start
      os.path.basename(self.path), self.start_error_message)
  selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH. </p>
  
  <p>Exception ignored in: >
  Traceback (most recent call last):
    File "C:\Users\User\AppData\Local\Programs\Python\Python35-32\lib\site-packages\selenium\webdriver\common\service.py", line 173, in <strong>del</strong>
      self.stop()
    File "C:\Users\User\AppData\Local\Programs\Python\Python35-32\lib\site-packages\selenium\webdriver\common\service.py", line 145, in stop
      if self.process is None:
  AttributeError: 'Service' object has no attribute 'process'</p>
  
  <p>Process finished with exit code 1</p>
  
  <p>I installed all the libraries requested on the webpage, and even did that --upgrade selenium thing in hopes of getting rid of the errors.
  Is there any way to solve this? 
  So far all I know is that the program runs just fine until the 'browser = Browser('firefox', profile_preferences=proxy_settings)' occurs. Also the Tor browser is open, so no problems there.
  Been searching for an hour and a half for a solution to this, and I've tried everything that relates to this subject.</p>