Hey! i got an error while evoking the chromedriver

PermissionError Traceback (most recent call last)
c:\users\abhin\appdata\local\programs\python\python38-32\lib\site-packages\selenium\webdriver\common\service.py in start(self)
71 cmd.extend(self.command_line_args())
—> 72 self.process = subprocess.Popen(cmd, env=self.env,
73 close_fds=platform.system() != ‘Windows’,

c:\users\abhin\appdata\local\programs\python\python38-32\lib\subprocess.py in init(self, args, bufsize, executable, stdin, stdout, stderr, preexec_fn, close_fds, shell, cwd, env, universal_newlines, startupinfo, creationflags, restore_signals, start_new_session, pass_fds, encoding, errors, text)
853
–> 854 self._execute_child(args, executable, preexec_fn, close_fds,
855 pass_fds, cwd, env,

c:\users\abhin\appdata\local\programs\python\python38-32\lib\subprocess.py in _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, unused_restore_signals, unused_start_new_session)
1306 try:
-> 1307 hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
1308 # no special security

PermissionError: [WinError 5] Access is denied

During handling of the above exception, another exception occurred:

WebDriverException Traceback (most recent call last)
in
----> 1 browser = webdriver.Chrome(“C:\webdriver”)

c:\users\abhin\appdata\local\programs\python\python38-32\lib\site-packages\selenium\webdriver\chrome\webdriver.py in init(self, executable_path, port, options, service_args, desired_capabilities, service_log_path, chrome_options, keep_alive)
71 service_args=service_args,
72 log_path=service_log_path)
—> 73 self.service.start()
74
75 try:

c:\users\abhin\appdata\local\programs\python\python38-32\lib\site-packages\selenium\webdriver\common\service.py in start(self)
84 )
85 elif err.errno == errno.EACCES:
—> 86 raise WebDriverException(
87 “’%s’ executable may have wrong permissions. %s” % (
88 os.path.basename(self.path), self.start_error_message)

WebDriverException: Message: ‘webdriver’ executable may have wrong permissions. Please see https://sites.google.com/a/chromium.org/chromedriver/home

plss help!!!

hey @abhinavpnp.kumar ,
try changing the chrome driver path ,
its currently in c drive , and hence i guess its not able to read it from there.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.

You can test if it actually is in the PATH, if you open a cmd and type in chromedriver and hit Enter. If Starting ChromeDriver 2.15.322448 is appearing, the PATH is set appropriately and there is something else going wrong. Then try the following:

Download ChromeDriver

Then you have multiple options:

  • Add it to your system path
  • Put it in the same directory as your python script
  • Specify the location directly via executable_path

driver = webdriver.Chrome(executable_path='C:/path/to/chromedriver.exe')

Before you add the chromedriver to your path, make sure it’s the same version as your browser.

If not, you will need to match versions: either update/downgrade you chrome, and upgrade/downgrade your webdriver.