WebDriver.__init__() got an unexpected keyword argument 'executable_path'
When trying to use the scrape function, I'm facing and type error, is this due to different version of packages?
https://stackoverflow.com/questions/76550506/typeerror-webdriver-init-got-an-unexpected-keyword-argument-executable-p
Same issue
Upd: reinstallation of the selenium library has helped. Don't forget to check the requirements file for the right version.
I encountered this issue and go to this link commented by @siiyayu. All answers mentioned point out to "selenium updated version executable_path was removed". I solve this by directly editing the Scweet/utils.py:
from:
driver = webdriver.Chrome(options=options, executable_path=driver_path)
to
service = Service(executable_path=driver_path)
driver = webdriver.Chrome(options=options, service=service)
I am not mistaken, this is line 167.
i get NameError: name 'Service' is not defined.
@nadip07 Service needs to be imported. Add from selenium.webdriver.chrome.service import Service at the top.
And then replace
driver = webdriver.Chrome(options=options, executable_path=chromedriver_path)
with
service = Service(executable_path=chromedriver_path)
driver = webdriver.Chrome(options=options, service=service)
Hey @vizcodes this issue should be closed. Both @OskarNS and @Justinjay282 provided answers that resolved the issue.
Closing the issue, as its resolved!