Home > Mobile >  How to correctly specify the path to chromedriver in pythonanywhere project
How to correctly specify the path to chromedriver in pythonanywhere project

Time:08-20

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

CodePudding user response:

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

CodePudding user response:

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")
  • Related