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

Fix TypeError when no browser version found #545

Merged
merged 1 commit into from
Jul 24, 2023
Merged

Fix TypeError when no browser version found #545

merged 1 commit into from
Jul 24, 2023

Conversation

mskozlova
Copy link
Contributor

@mskozlova mskozlova commented Jul 24, 2023

Right now it fails like this:

expected string or bytes-like object, got 'NoneType'

File "/function/code/main.py", line 19, in doit
    installed = manager.install()
   File "/function/code/webdriver_manager/chrome.py", line 39, in install
    driver_path = self._get_driver_binary_path(self.driver)
   File "/function/code/webdriver_manager/core/manager.py", line 33, in _get_driver_binary_path
    file = self._download_manager.download_file(driver.get_driver_download_url())
   File "/function/code/webdriver_manager/drivers/chrome.py", line 45, in get_driver_download_url
    driver_version_to_download = self.get_driver_version_to_download()
   File "/function/code/webdriver_manager/core/driver.py", line 51, in get_driver_version_to_download
    else self.get_latest_release_version()
   File "/function/code/webdriver_manager/drivers/chrome.py", line 71, in get_latest_release_version
    if version.parse(determined_browser_version) >= version.parse("113"):
   File "/function/code/packaging/version.py", line 52, in parse
    return Version(version)
   File "/function/code/packaging/version.py", line 196, in __init__
    match = self._regex.search(version)

Right now it fails like this:
```
File "/function/code/main.py", line 19, in doit
    installed = manager.install()
   File "/function/code/webdriver_manager/chrome.py", line 39, in install
    driver_path = self._get_driver_binary_path(self.driver)
   File "/function/code/webdriver_manager/core/manager.py", line 33, in _get_driver_binary_path
    file = self._download_manager.download_file(driver.get_driver_download_url())
   File "/function/code/webdriver_manager/drivers/chrome.py", line 45, in get_driver_download_url
    driver_version_to_download = self.get_driver_version_to_download()
   File "/function/code/webdriver_manager/core/driver.py", line 51, in get_driver_version_to_download
    else self.get_latest_release_version()
   File "/function/code/webdriver_manager/drivers/chrome.py", line 71, in get_latest_release_version
    if version.parse(determined_browser_version) >= version.parse("113"):
   File "/function/code/packaging/version.py", line 52, in parse
    return Version(version)
   File "/function/code/packaging/version.py", line 196, in __init__
    match = self._regex.search(version)
```
@mskozlova
Copy link
Contributor Author

Looks like the macos test failure is unrelated. So it should be safe to merge.
But I don't have write access.

Sergey, can you merge it?

@SergeyPirogov SergeyPirogov merged commit 1a93434 into SergeyPirogov:master Jul 24, 2023
@mskozlova mskozlova deleted the patch-1 branch July 24, 2023 10:43
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

Successfully merging this pull request may close these issues.

2 participants