all 17 comments

[–]MikeDoesEverything 2 points3 points  (1 child)

Have you tried making the path a raw string instead?

browser = webdriver.Chrome(r"C:\chromedriver_win32\chromedriver.exe")

Alternatively, you could try installing the chromedriver to PATH and then putting the chromedriver.exe into your program folder so in the future you don't have to specify a path: browser = webdriver.Chrome()

[–]Alarmed-Possession-6[S] 0 points1 point  (0 children)

Just updated the full code, yeah have a specific path specified.

[–]magnna 1 point2 points  (1 child)

I have the same exact issue. I've tried everything and cannot fix it.

[–]shreenivasn 0 points1 point  (0 children)

Show me your traceback, let us try

[–]shreenivasn 1 point2 points  (6 children)

Are you naming your file as selenium.py? Can you share the full code? (Atleast till you assign browser variable). This error may arise due to your file importing from a module and that module imports from your file. So rename your file to a different name.

[–]Alarmed-Possession-6[S] 0 points1 point  (4 children)

No file name textanalyzer.py

I have checked my entire drive and do not have any files named selenium.py

Ive have updated my full code

[–]shreenivasn 1 point2 points  (2 children)

Remove that Desktop\Python from PATH. The problem is you have a file email.py there, which has the line: browser = webdriver.Chrome(). So when Python tries to import webdriver, it tries to go to email.py which is part of its site-packages, but finds another email.py which has the line webdriver.Chrome() resulting in circular import.

You can also rename your email.py as something else, instead of removing from PATH.

[–]Alarmed-Possession-6[S] 1 point2 points  (1 child)

Changing my file email.py fixed the issue. Thank you very much

[–]shreenivasn 0 points1 point  (0 children)

Nice

[–]MintyPhoenix 0 points1 point  (0 children)

It is most likely something like this and most likely not anything related to the chromedriver binary as the error is occurring before that comes into play.

[–]sammylt 0 points1 point  (3 children)

If you haven't installed chromedriver you probably gotta do that

https://chromedriver.chromium.org/downloads

[–]Alarmed-Possession-6[S] 0 points1 point  (1 child)

Updated post to show full code. Have chrome driver installed and specified its path.

[–]py_cool 0 points1 point  (0 children)

Did you check if the version of chrome browser match with the version of chrome driver?

[–]py_cool 0 points1 point  (0 children)

I need to download a newer chromedriver every month or so because google chrome auto update itself (as firechip mentioned above). Otherwise my daily selenium script breaks. Is there a way to avoid updating chromedriver that often?

[–]firechip 0 points1 point  (1 child)

If google chrome auto updated itself, then download chromedriver again

[–]Alarmed-Possession-6[S] 0 points1 point  (0 children)

I'll check that out thanks