0

I have this problem show me error :

TypeError: 'module' object is not callable

How to solve that?

I use pycharm and try to change path for C:\Users\MOSTAFA\Desktop\chromedriver.exe and not working.

enter image description here

undetected Selenium
  • 183,867
  • 41
  • 278
  • 352

2 Answers2

0

Single "\" as strings are considered escape sequences.

Source

To avoid this, you need to use "\\" so python will consider it as "\".

driver  = webdriver.chrome("C:\\Users\\MOSTAFA\\Desktop\\webdrivers\\chromedriver.exe")

or just use "/" instead of "\"

driver  = webdriver.chrome("C:/Users/MOSTAFA/Desktop/webdrivers/chromedriver.exe")

cocorocho
  • 35
  • 5
0

You were close enough. You need to replace the lowercase c with uppercase C to initiate a ChromeDriver controlled Chrome browsing context. So your effective line of code will be:

driver = webdriver.Chrome(executable_path=r'C:\Users\MOSTAFA\Desktop\chromedriver.exe')

Reference

You can find detailed discussion in:

undetected Selenium
  • 183,867
  • 41
  • 278
  • 352