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

webdriver-manager with error on Chromium #669

Open
AlineGobbi opened this issue Jul 30, 2024 · 3 comments
Open

webdriver-manager with error on Chromium #669

AlineGobbi opened this issue Jul 30, 2024 · 3 comments

Comments

@AlineGobbi
Copy link

import pandas as pd
import mysql.connector
from bs4 import BeautifulSoup
from time import sleep
from datetime import datetime
from selenium.webdriver.common.keys import Keys
from selenium.common.exceptions import NoSuchElementException
from selenium import webdriver
from selenium.webdriver.chrome.service import Service as ChromiumService
from webdriver_manager.chrome import ChromeDriverManager
from webdriver_manager.core.os_manager import ChromeType

driver = webdriver.Chrome(service=ChromiumService(ChromeDriverManager(chrome_type=ChromeType.CHROMIUM).install()))

AttributeError: 'NoneType' object has no attribute 'get'

@derekSaga
Copy link

Can you show the traceback?

@batterseapower
Copy link

batterseapower commented Dec 17, 2024

Probably the same error:

    return webdriver.Chrome(ChromeDriverManager(chrome_type=ChromeType.CHROMIUM).install(), chrome_options=options)
  File "/Users/mbolingbroke/opt/anaconda3/lib/python3.9/site-packages/webdriver_manager/chrome.py", line 40, in install
    driver_path = self._get_driver_binary_path(self.driver)
  File "/Users/mbolingbroke/opt/anaconda3/lib/python3.9/site-packages/webdriver_manager/core/manager.py", line 35, in _get_driver_binary_path
    binary_path = self._cache_manager.find_driver(driver)
  File "/Users/mbolingbroke/opt/anaconda3/lib/python3.9/site-packages/webdriver_manager/core/driver_cache.py", line 107, in find_driver
    driver_version = self.get_cache_key_driver_version(driver)
  File "/Users/mbolingbroke/opt/anaconda3/lib/python3.9/site-packages/webdriver_manager/core/driver_cache.py", line 154, in get_cache_key_driver_version
    return driver.get_driver_version_to_download()
  File "/Users/mbolingbroke/opt/anaconda3/lib/python3.9/site-packages/webdriver_manager/core/driver.py", line 48, in get_driver_version_to_download
    return self.get_latest_release_version()
  File "/Users/mbolingbroke/opt/anaconda3/lib/python3.9/site-packages/webdriver_manager/drivers/chrome.py", line 61, in get_latest_release_version
    determined_browser_version = response_dict.get("builds").get(determined_browser_version).get("version")
AttributeError: 'NoneType' object has no attribute 'get'

@batterseapower
Copy link

batterseapower commented Dec 17, 2024

Basically the problem is that https://googlechromelabs.github.io/chrome-for-testing/latest-patch-versions-per-build.json dosen't contain entries for e.g. '133.0.6902'. Probably this problem is encountered by people using the very latest chromium release (which is the one that's easiest to download, since chromium doesn't have a regular release cadence but rather just publishes every snapshot)

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

3 participants