KraKoff_
KraKoff_

Reputation: 37

How to correctly specify the path to chromedriver in pythonanywhere project

I want to specify the path to a file in a python project on the pythonanywhere site. Unfortunately, I am getting an error. Here are pictures of the folder and console

Code:

driver = uc.Chrome(options=options, driver_executable_path="/user/KraKoff/files/home/KraKoff/chromedriver.exe")

Console

Folder

Upvotes: 1

Views: 4185

Answers (2)

Glenn
Glenn

Reputation: 5786

Do not specify the chromedriver path on PythonAnywhere. It is not necessary.

Upvotes: 0

undetected Selenium
undetected Selenium

Reputation: 193338

You are using

pythonanywhere

So you need to download and use the ChromeDriver executable of type instead of the type and you need to pass the absolute path without the extension i.e. .exe.


Solution

Your effective line of code will be:

driver = uc.Chrome(options=options, driver_executable_path="/user/KraKoff/files/home/KraKoff/chromedriver")

Upvotes: 1

Related Questions