Instapy: ChromeDriver Status code was: 127

Created on 17 Jan 2018  路  10Comments  路  Source: timgrossmann/InstaPy

Expected Behavior

I wanted to run python3 quickstart.py on an Ubuntu 16.04 LTS Server. I'm using the nogui=True setting. I've tried re-cloning the repository, placing the chromedriver binary in the folder again, etc (basically everything else I've found on the topic) but I still get the following error:

Current Behavior

Traceback (most recent call last):
File "quickstart.py", line 8, in
session = InstaPy(username=insta_username, password=insta_password, nogui=True)
File "/var/www/InstaPy/instapy/instapy.py", line 135, in __init__
self.set_selenium_local_session()
File "/var/www/InstaPy/instapy/instapy.py", line 194, in set_selenium_local_session
chrome_options=chrome_options)
File "/usr/local/lib/python3.5/dist-packages/selenium-2.53.6-py3.5.egg/selenium/webdriver/chrome/webdriver.py", line 62, in __init__
self.service.start()
File "/usr/local/lib/python3.5/dist-packages/selenium-2.53.6-py3.5.egg/selenium/webdriver/common/service.py", line 86, in start
self.assert_process_still_running()
File "/usr/local/lib/python3.5/dist-packages/selenium-2.53.6-py3.5.egg/selenium/webdriver/common/service.py", line 99, in assert_process_still_running
% (self.path, return_code)
selenium.common.exceptions.WebDriverException: Message: Service ./assets/chromedriver unexpectedly exited. Status code was: 127

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "quickstart.py", line 23, in
session.end()
NameError: name 'session' is not defined

Possible Solution (optional)

InstaPy configuration

from instapy import InstaPy

insta_username = 'myuser'
insta_password = 'mypass'

try:
session = InstaPy(username=insta_username, password=insta_password, nogui=True)
session.login()

session.set_upper_follower_count(limit=2500)
session.set_do_comment(True, percentage=10)
session.set_comments(['aMEIzing!', 'So much fun!!', 'Nicey!'])
session.set_dont_include(['friend1', 'friend2', 'friend3'])
session.set_dont_like(['pizza', 'girl'])

session.like_by_tags(['natgeo'], amount=1)

finally:
session.end()

Most helpful comment

Add this issue, installing chromium and using latest chrome driver fixed it for me

apt-get install chromium-browser

All 10 comments

It might be an issue with the version of chromedriver you are using. Did you try a fresh install of instapy with all its dependencies?

Add this issue, installing chromium and using latest chrome driver fixed it for me

apt-get install chromium-browser

Ha, thanks man! That fixed it for me!

i install chromdriver and selenium i got error please help me

selenium.common.exceptions.WebDriverException: Message: Service chromedriver unexpectedly exited. Status code was: 127

@c20xh2 Fixed for me too.
Thanks!

I have the exact same issue, but both my chromium and chromedriver are on the latest version.

If you got issues on downloading chromium-browser from apt,
Install google-chrome-stable, worked for me!

wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
dpkg -i google-chrome-stable_current_amd64.deb; apt-get -fy install

@c20xh2 thanks mang

For not helped issue.
ERROR [2018-07-22 19:51:17] [someinst] Message: unknown error: DevToolsActivePort file doesn't exist
(Driver info: chromedriver=2.40.565383 (76257d1ab79276b2d53ee976b2c3e3b9f335cde7),platform=Linux 4.9.0-7-amd64 x86_64)
Traceback (most recent call last):
File "/home/InstaPy-master/instapy/instapy.py", line 297, in set_selenium_local_session
chrome_options=chrome_options)
File "/usr/local/lib/python2.7/dist-packages/selenium-2.53.6-py2.7.egg/selenium/webdriver/chrome/webdriver.py", line 69, in __init__
desired_capabilities=desired_capabilities)
File "/usr/local/lib/python2.7/dist-packages/selenium-2.53.6-py2.7.egg/selenium/webdriver/remote/webdriver.py", line 90, in __init__
self.start_session(desired_capabilities, browser_profile)
File "/usr/local/lib/python2.7/dist-packages/selenium-2.53.6-py2.7.egg/selenium/webdriver/remote/webdriver.py", line 177, in start_session
response = self.execute(Command.NEW_SESSION, capabilities)
File "/usr/local/lib/python2.7/dist-packages/selenium-2.53.6-py2.7.egg/selenium/webdriver/remote/webdriver.py", line 236, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python2.7/dist-packages/selenium-2.53.6-py2.7.egg/selenium/webdriver/remote/errorhandler.py", line 192, in check_response
raise exception_class(message, screen, stacktrace)
WebDriverException: Message: unknown error: DevToolsActivePort file doesn't exist
(Driver info: chromedriver=2.40.565383 (76257d1ab79276b2d53ee976b2c3e3b9f335cde7),platform=Linux 4.9.0-7-amd64 x86_64)

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

Debian 9

I have latest version of the chromedriiver installed. Still getting the error when I run it on ubuntu server.

Message: Service /home/Git/InstaPy/assets/chromedriver unexpectedly exited. Status code was: 127
Traceback (most recent call last):
  File "/home/Git/InstaPy/instapy/instapy.py", line 340, in set_selenium_local_session
    chrome_options=chrome_options)
  File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/chrome/webdriver.py", line 68, in __init__
    self.service.start()
  File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/common/service.py", line 98, in start
    self.assert_process_still_running()
  File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/common/service.py", line 111, in assert_process_still_running
    % (self.path, return_code)
selenium.common.exceptions.WebDriverException: Message: Service /home/Git/InstaPy/assets/chromedriver unexpectedly exited. Status code was: 127

Traceback (most recent call last):
  File "/home/Git/InstaPy/instapy/instapy.py", line 340, in set_selenium_local_session
    chrome_options=chrome_options)
  File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/chrome/webdriver.py", line 68, in __init__
    self.service.start()
  File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/common/service.py", line 98, in start
    self.assert_process_still_running()
  File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/common/service.py", line 111, in assert_process_still_running
    % (self.path, return_code)
selenium.common.exceptions.WebDriverException: Message: Service /home/Git/InstaPy/assets/chromedriver unexpectedly exited. Status code was: 127


During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "quickstart.py", line 16, in <module>
    headless_browser=True)
  File "/home/Git/InstaPy/instapy/instapy.py", line 224, in __init__
    self.set_selenium_local_session()
  File "/home/Git/InstaPy/instapy/instapy.py", line 344, in set_selenium_local_session
    Settings.chromedriver_location))
instapy.instapy.InstaPyError: ensure chromedriver is installed at /home/Git/InstaPy/assets/chromedriver
Was this page helpful?
0 / 5 - 0 ratings

Related issues

seuraltimez picture seuraltimez  路  3Comments

n0sw34r picture n0sw34r  路  3Comments

ghost picture ghost  路  3Comments

harrypython picture harrypython  路  3Comments

rahulkapoor90 picture rahulkapoor90  路  3Comments