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

FileNotFoundError: [Errno 2] No such file or directory: 'chromedriver' #24

Open
kmb25 opened this issue May 13, 2023 · 3 comments
Open

Comments

@kmb25
Copy link

kmb25 commented May 13, 2023

Any chance you know where I'm going wrong here. Thanks!

@youngfreeFJS
Copy link

@kmb25 it is Selenium problem.
What platform is your code running on? Linux, macOS, Windows or other platform?
You can take a look at this link first: https://stackoverflow.com/questions/64919950/filenotfounderror-errno-2-no-such-file-or-directory-users-fuadhafiz-docume

@faddy19
Copy link

faddy19 commented May 30, 2023

You need to put your chromedriver to the same directory or the one where it should be. Download chromedriver first on google and place it somewhere. Copy the Path and paste it to your code. This should solve it

@TakaWakiyama
Copy link

The reason for the error may be a mismatch between the version of ChromeDriver you are using and the version of Google Chrome installed on your system. The specific error message you received is: "selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 77."

Thin can be help you.

  1. install webdriver-manager
    poetry add webdriver-manager

  2. mofify chromegpt/tools/selenium.py to auto resolve driver versions.

from webdriver_manager.chrome import ChromeDriverManager  # <- add

def __init__(self, headless: bool = False) -> None:
~~~~~~~~~~~
- self.driver = webdriver.Chrome(options=chrome_options)
+ self.driver = webdriver.Chrome(ChromeDriverManager().install(), options=chrome_options)

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

4 participants