Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chromedriver/Chrome Browser version mismatch #4

Open
bji219 opened this issue Mar 13, 2023 · 0 comments
Open

Chromedriver/Chrome Browser version mismatch #4

bji219 opened this issue Mar 13, 2023 · 0 comments

Comments

@bji219
Copy link
Contributor

bji219 commented Mar 13, 2023

The code chunk below downloads the latest chromedriver and extracts it which is great, but if the user's chrome browser is at a lower version the code will fail.

# Get latest chromedriver zip file for mac, extract into same folder
try:
    version = requests.get('https://chromedriver.storage.googleapis.com/LATEST_RELEASE').text
    url = 'https://chromedriver.storage.googleapis.com/{0}/{1}'.format(version, 'chromedriver_mac64.zip')
    r = requests.get(url, allow_redirects=True)
    open('chromedriver.zip', 'wb').write(r.content)
    with zipfile.ZipFile("chromedriver.zip", "r") as zip_ref:
        zip_ref.extractall()
except:
    pass

Error text:

selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 111 Current browser version is 110.0.5481.77 with binary path C:\xxxxx

Proposed solutions: checking if the chromedriver download is necessary before executing the try/except block.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant