1

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

1
  • Isn't that file just in /home/KraKoff/chromedriver.exe? There's nothing in the console that indicates that /user/KraKoff/files is part of the path. Commented Aug 19, 2022 at 19:14

2 Answers 2

1

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")
Sign up to request clarification or add additional context in comments.

2 Comments

Downloaded linux version. With /user/KraKoff/files/home/KraKoff/chromedriver path the error stays the same. Tried /home/KraKoff/chromedriver and now and now the error is this: Message: 'chromedriver' executable may have wrong permissions. Please see chromedriver.chromium.org/home Added print(uc.Patcher.data_path) in code and aslo in console is PermissionError: [Errno 13] Permission denied: '/home/KraKoff/chromedriver'
Hi! facing the same problem. Have you managed to resolve the permission issue?
0

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

1 Comment

Now it is Message: unknown error: cannot connect to chrome at 127.0.0.1:60291 from chrome not reachable error...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.