Unable to run Chrome webdriver in Selenium
Asked Answered
G

1

10

I am trying selenium for the first time and I get a AttributeError: 'str' object has no attribute '_ignore_local_proxy' error, when running code taken from here:

from selenium import webdriver

driver_path = '/Users/krishpatil/Downloads/chromedriver_mac_arm64/chromedriver'
driver = webdriver.Chrome(driver_path)
driver.get('https://hoopshype.com/salaries/players/')

I have tried updating Selenium and downloading the right chromedriver, however the problem still persists.

Galagalactagogue answered 10/6, 2023 at 10:16 Comment(0)
D
15
  1. Download the chromedriver from Here
  2. Unzip the downloaded file
  3. Move the file 'chromedriver.exe' to the folder of project, and remove its path from the code, the code will be:
driver = webdriver.Chrome()
Dotted answered 10/6, 2023 at 10:50 Comment(5)
This answer is a Winner. Fixed no problems.Terni
worked perfectly. but why this is happened?Exaction
@wisnshaftler, it could be with the accessing a file outside the project. Having it in a project folder maybe will have different access controls.Vasyuta
Not a good solution, I followed the steps, but still getting the same error.Iona
I'm running the code in visual studio code(ubuntu server) from mac laptop.,Iona

© 2022 - 2024 — McMap. All rights reserved.