Scweet icon indicating copy to clipboard operation
Scweet copied to clipboard

WebDriver.__init__() got an unexpected keyword argument 'executable_path'

Open vizcodes opened this issue 3 years ago • 3 comments

When trying to use the scrape function, I'm facing and type error, is this due to different version of packages? ss

vizcodes avatar Nov 18 '23 07:11 vizcodes

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.

andreibeliaev avatar Dec 13 '23 22:12 andreibeliaev

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.

jstnjy avatar Feb 25 '24 07:02 jstnjy

i get NameError: name 'Service' is not defined.

nadip07 avatar Mar 09 '24 18:03 nadip07

@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)

OskarNS avatar Jun 19 '24 18:06 OskarNS

Hey @vizcodes this issue should be closed. Both @OskarNS and @Justinjay282 provided answers that resolved the issue.

MidpriceDog avatar Jun 27 '24 00:06 MidpriceDog

Closing the issue, as its resolved!

vizcodes avatar Jun 29 '24 09:06 vizcodes