Instapy: 'chromedriver' executable may have wrong permissions

Created on 24 Jul 2018  路  22Comments  路  Source: timgrossmann/InstaPy

Info

I was using InstaPy successfully couple of months ago. I am setting up everything again after a Windows crash. I am getting the following error. I am using the latest Chrome driver (chromedriver_win32_v2.40) in the 'assets' folder. I tried copying a older version (chromedriver_win32_v2.37) with which I was running successfully before crash. But I am getting the following error.

Could someone please help me?

Current Behavior

`E:\Workspace\InstaPy>python quickstart.py
ERROR [2018-07-24 13:26:09] [myusername] Message: 'chromedriver' executable may have wrong permissions. Please see https://sites.google.com/a/chromium.org/chromedriver/home
Traceback (most recent call last):
File "E:\Workspace\Python\Python37\lib\site-packages\seleniumwebdriver\common\service.py", line 76, in start
stdin=PIPE)
File "E:\Workspace\Python\Python37\lib\subprocess.py", line 756, in __init__
restore_signals, start_new_session)
File "E:\Workspace\Python\Python37\lib\subprocess.py", line 1155, in _execute_child
startupinfo)
PermissionError: [WinError 5] Access is denied

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "E:\Workspace\InstaPy\instapy\instapy.py", line 297, in set_selenium_local_session
chrome_options=chrome_options)
File "E:\Workspace\Python\Python37\lib\site-packages\seleniumwebdriver\chromewebdriver.py", line 68, in __init__
self.service.start()
File "E:\Workspace\Python\Python37\lib\site-packages\seleniumwebdriver\common\service.py", line 88, in start
os.path.basename(self.path), self.start_error_message)
selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable may have wrong permissions. Please see https://sites.google.com/a/chromium.org/chromedriver/home

Traceback (most recent call last):
File "E:\Workspace\Python\Python37\lib\site-packages\seleniumwebdriver\common\service.py", line 76, in start
stdin=PIPE)
File "E:\Workspace\Python\Python37\lib\subprocess.py", line 756, in __init__
restore_signals, start_new_session)
File "E:\Workspace\Python\Python37\lib\subprocess.py", line 1155, in _execute_child
startupinfo)
PermissionError: [WinError 5] Access is denied

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "E:\Workspace\InstaPy\instapy\instapy.py", line 297, in set_selenium_local_session
chrome_options=chrome_options)
File "E:\Workspace\Python\Python37\lib\site-packages\seleniumwebdriver\chromewebdriver.py", line 68, in __init__
self.service.start()
File "E:\Workspace\Python\Python37\lib\site-packages\seleniumwebdriver\common\service.py", line 88, in start
os.path.basename(self.path), self.start_error_message)
selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable may have wrong permissions. Please see https://sites.google.com/a/chromium.org/chromedriver/home

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "quickstart.py", line 22, in
multi_logs=True)
File "E:\Workspace\InstaPy\instapy\instapy.py", line 190, in __init__
self.set_selenium_local_session()
File "E:\Workspace\InstaPy\instapy\instapy.py", line 301, in set_selenium_local_session
Settings.chromedriver_location))
instapy.instapy.InstaPyError: ensure chromedriver is installed at E:\Workspace\InstaPy\assets\chromedriver`

InstaPy configuration

Latest InstaPy
Python 3.7.0
ChromeDriver 2.41
Chrome 68.x (up-to-date)
Windows 10

Please let me know if any additional info is needed.

In Windows properties > Security I have given full control for 'chromedriver.exe'. But I am still getting this issue.

wontfix

Most helpful comment

Hi!

Did you wrote the extension ".EXE" of the file ?
Like this:
driver = webdriver.Chrome('C:/someFolder/*/otherFolder/WebDriver/chromedriver.exe')

All 22 comments

I removed the 'chromedriver_location' variable and entered the full page of the driver as suggested in some discussions. But this doesn't help.

self.browser = webdriver.Chrome("E:\\Workspace\\InstaPy\\assets\\chromedriver\\chromedriver.exe", desired_capabilities=capabilities, chrome_options=chrome_options)

And make sure that you actually have chrome installed
You can install it on Debian like explained here

@PJUllrich Thanks for the help!

I read through the referenced link.

I installed the latest version of Chrome browser and Chrome driver (for Windows). I am still getting the same error.

I have spent few days trying to resolved this, but still unsuccessful.

Can you someone hint me where the issue is? Is this an issue with InstaPy or Chromedriver or elsewhere? Where should I start analyzing?

Any info will be greatly helpful!

Can someone please help with this?

Hi!

Did you wrote the extension ".EXE" of the file ?
Like this:
driver = webdriver.Chrome('C:/someFolder/*/otherFolder/WebDriver/chromedriver.exe')

@LeoGaller Thank you this helped!

Hi!

Did you wrote the extension ".EXE" of the file ?
Like this:
driver = webdriver.Chrome('C:/someFolder/*/otherFolder/WebDriver/chromedriver.exe')

sorry, but I cant find where to do this at?
@LeoGaller

Hi!

When you are creating your program you must define your driver, this is a sample definition:

driver = webdriver.Chrome('C:/someFolder/*/otherFolder/WebDriver/chromedriver.exe')

With this code you are saying where the webdriver is.

For example, when you download the chrome driver on windows the file is disponible at the donwloads folder.

So you need to unzip it, and use the path to the chromedriver.exe file in your code.

Let me know if this helps.

@LeoGaller Thanks! helped allot!

My pleasure! :)

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

If this problem still occurs, please open a new issue

Having the same issue ith Mac.

It was working before

All of sudden start getting this error

Chrome latest browser is installed and up to date
Mac os is upto date

Python is up to date

ChromeDriverManager().get_download_path(version="79.0.3945.36")
this returns path to folder not to executable -
/Users/dev/p37/WebDriverManager/chrome/79.0.3945.36

what is the corect way to use this?

Hi
I am in linux and I am getting the same error even after doing what @LeoGaller. Please could someone help

Try to change permissions of download path folder -

       ```

self.chrome_driver_path = ChromeDriverManager().get_download_path(version="79.0.3945.36")
# Set permissions to prevent error:
# Message: '79.0.3945.36' executable may have wrong permissions.
st = os.stat(self.chrome_driver_path)
os.chmod(self.chrome_driver_path, st.st_mode | stat.S_IEXEC)
```

@foorman Yes, It woked now. Thanks very much.

Try to change permissions of download path folder -

       ```

self.chrome_driver_path = ChromeDriverManager().get_download_path(version="79.0.3945.36")

Set permissions to prevent error:

Message: '79.0.3945.36' executable may have wrong permissions.

st = os.stat(self.chrome_driver_path)
os.chmod(self.chrome_driver_path, st.st_mode | stat.S_IEXEC)

im also working on linux from a command terminal, were do i change permision ?

@matias-hub you can run python command in terminal. google that

Hi All
I just add my little contribution:

  • in my case, the antivirus (Comodo) was not recognizing chromedriver and so was isolating it
    As a consequence, similarly to the other guys in this thread I was getting the error message "...wrong permissions..."
    I solved qualifying chromedriver as a trusted application

Hi!

Did you wrote the extension ".EXE" of the file ?
Like this:
driver = webdriver.Chrome('C:/someFolder/*/otherFolder/WebDriver/chromedriver.exe')

Thanks for this. It worked.

Hi everyone, I have been having the same issue on my Mac. The chromedriver was located in a folder within my iCloud drive. Once I moved it to a location not updating to the cloud everything worked great. Hope this helps someone.

Was this page helpful?
0 / 5 - 0 ratings