-
-
Notifications
You must be signed in to change notification settings - Fork 469
ChromeDriver.install() bug #649
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
Comments
same issue here |
Something similar here with a slightly different error. On my Mac M3 I get the following error.
I fixed this a couple of days ago by reinstalling selenium and webdriver_manager through pip. But for some reason the error is back. My env has not changed. Running the same fix doesn't resolve the issue. To reproduce use:
On Python 3.9 with selenium version 4.16.0 and webdriver-manager version 4.0.1. Edit: A temporary fix is to remove the .wdm folder and --upgrade the package.
|
Likely culprit: It looks like webdriver manager can't resolve the webdriver path. This likely means one of 3 things, it can't find chrome, it can't find chromedriver, or it can't map the correct version of chrome to the correct version of chromedriver. |
Traceback
|
I don't see how this code was ever able to work. Is it required for chrome to be installed? determined_browser_version = self.get_browser_version_from_os()
log(f"Get LATEST {self._name} version for {self._browser_type}")
if determined_browser_version is not None and version.parse(determined_browser_version) >= version.parse("115"):
...
return determined_browser_version
# at this point, determined_browser_version can be None if chrome is not installed, so splitting cannot work
determined_browser_version = ".".join(determined_browser_version.split(".")[:3])
latest_release_url = (
self._latest_release_url
if (determined_browser_version is None)
else f"{self._latest_release_url}_{determined_browser_version}"
) I am creating a PR right away |
Same problem here |
…ails We have been seeing `AttributeError: 'NoneType' object has no attribute 'split'` in Sentry. According to SergeyPirogov/webdriver_manager#649, this occurs when Chrome is not installed, or when no suitable ChromeDriver version is available for the installed version of Chrome. Instead of the `AttributeError`, we can print a better message for the agent and user to help them fix the issue. --- Co-authored-by: kcze <[email protected]>
Temporary solution is to install the webdriver manually |
This doesn't work for me. I alternatively installed a full-sized chrome with |
Yeah that's the bug. I think when this repository was originally designed, it was designed with local instances of browsers in mind, and not remote browsers/browser-servers. So, with the original design, you had to have a local installation available. |
I am having this same issue except I am attempting to run some scraping with Selenium in MWAA. Does anyone have any tips on how I could resolve it there? |
I was running into this issue when using Solution:
For context this was the problematic code before running into the same issues others cited above:
|
The simplest fix for this is just to set the driver_version, I set mine to "120" and the download worked fine. It looks like the OperationSystemManager class is unable to identify the most recent version of chrome.
I think it would be a good idea to check that determined_browser_version isn't None before being split, and just set it to a hard coded default value if it is. Or it might even better better to fix upstream in get_browser_version_from_os, and make that return a hard coded default value. Solution:
|
Yeah, ive been having issues as well. Just confused, first time wanting to use google chrome through my bot. Just getting errors where its not finding google chrome. Am I supposed to install google chrome in my bots file? As this is in a server, not my own os. |
I think that is currently the expectation. Webdriver itself doesn't require a local installation of Chrome, but running Chrome remotely used to be a niche use case. This library was written when running remote instances wasn't very common. At least not as common as running it locally. Technically, you only need chrome installed. I don't believe that this library actually launches Chrome. |
I'm also getting this error and I don't know why, because I have Chrome installed. |
Hello guys! And then I just provided the path like this:
|
This Solution written above works great for me running python under cygwin/Mobaterm. I think maybe the library is getting mixed up about whether I'm using Windows or Linux.
|
When trying to replicate the ChromeDriver example in the documentation, I get the following error :
AttributeError: 'NoneType' object has no attribute 'split'
To reproduce:
Used to work but suddenly doesn't -- maybe there was some update I'm not aware of?
The text was updated successfully, but these errors were encountered: