When you launch Chrome in Python, you will see "attribute error partially initialized module 'selenium.webdriver 'has no attribute 'chrome'".

Asked 2 years ago, Updated 2 years ago, 117 views

Until now, it was able to boot, but it stopped booting a couple of days ago, and it said "attribute error partially initialized module' selenium.webdriver'has no attribute'chrome'".
The folder name is "Ah" and the file name is "Startup.
Mac OS python 3.9.7
chrome 103.0.5060.53
chromedriver 103.0.5060.53

I have also installed selenium.
The code should look like this:

import time
from selenium import webdriver

driver_path='./chromedriver' 

driver=webdriver.Chrome(driver_path)

driver.get('https://www.google.com/')

time.sleep(3)

driver.quit()

python google-chrome selenium-webdriver

2022-09-30 11:44

1 Answers

You should be able to install services over the code.

driver=webdriver.Chrome(service=Service(ChromeDriverManager().install()))

Why don't you try installing it automatically now?


2022-09-30 11:44

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.