-1

I am new to python currently learning how to automate browser. When I try to use the chrome webdriver with selenium then it also shows me an error which says

Traceback (most recent call last):
  File "C:\Users\Ashu\Desktop\Python\chromedriver_win32\t.py", line 3, in <module>
    browser = webdriver.Chrome("C:\\Users\\Ashu\\Desktop\\Python\\chromedriver_win32\\chromedriver.exe")
  File "C:\Users\Ashu\AppData\Local\Programs\Python\Python36-32\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 68, in __init__
    self.service.start()
  File "C:\Users\Ashu\AppData\Local\Programs\Python\Python36-32\lib\site-packages\selenium\webdriver\common\service.py", line 104, in start
    raise WebDriverException("Can not connect to the Service %s" % self.path)
selenium.common.exceptions.WebDriverException: Message: Can not connect to the Service C:\Users\Ashu\Desktop\Python\chromedriver_win32\chromedriver.exe

I also tried to do it with other browsers using their respective webdrivers but all of them are throwing the same error.

Anyone please help me to get this problem fixed. Any help is appreciated.

  • possible duplicate https://stackoverflow.com/questions/24900922/webdriverexception-message-can-not-connect-to-the-chromedriver-error-in-uti – yash May 15 '18 at 15:34
  • Possible duplicate of [Python : no module named selenium](https://stackoverflow.com/questions/48267633/python-no-module-named-selenium) – undetected Selenium May 15 '18 at 15:49

1 Answers1

0

Seems like you have a version of the requests package which is incompatible with the version of Selenium you're trying to install. From the first output, it says your version is newer than what is required, so try downgrading your requests package to version 2.0.0. You can do so with the following command:

pip install requests==2.0.0

Hope this helps!

natn2323
  • 1,983
  • 1
  • 13
  • 30
  • I recommend that you close out this question since you accepted my answer previously, and open a new question with the newer issue. In any case, check out this thread: https://stackoverflow.com/questions/35624689/selenium-python-can-not-connect-to-the-service-s-self-path – natn2323 May 16 '18 at 15:28