Command: python3 quickstart.py
Traceback (most recent call last):
File "quickstart.py", line 14, in <module>
InstaPy(username="Username", password="password")\
File "/home/ubuntu/InstaPy/instapy/instapy.py", line 37, in __init__
self.browser = webdriver.Chrome('./assets/chromedriver', chrome_options=chrome_options)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/chrome/webdriver.py", line 62, in __init__
self.service.start()
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/common/service.py", line 86, in start
self.assert_process_still_running()
File "/usr/local/lib/python3.5/dist-packages/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
Help??
Are you running on a server?
try adding nogui=True to the IntaPy constructor.
I am running it on a online linix server, I have my chromedriver in the right place and it is updated but am still getting this when I open 'Quickstart.py'
`Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/common/service.py", line 64, in start
stdout=self.log_file, stderr=self.log_file)
File "/usr/lib/python3.5/subprocess.py", line 947, in __init__
restore_signals, start_new_session)
File "/usr/lib/python3.5/subprocess.py", line 1551, in _execute_child
raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: './assets/chromedriver'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "InstaPy/quickstart.py", line 14, in
InstaPy()\
File "/home/ubuntu/InstaPy/instapy/instapy.py", line 37, in __init__
self.browser = webdriver.Chrome('./assets/chromedriver', chrome_options=chrome_options)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/chrome/webdriver.py", line 62, in __init__
self.service.start()
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/common/service.py", line 71, in start
os.path.basename(self.path), self.start_error_message)
selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home
Exception ignored in:
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/common/service.py", line 163, in __del__
self.stop()
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/common/service.py", line 135, in stop
if self.process is None:
AttributeError: 'Service' object has no attribute 'process`
@Josh452 Please post your quickstart.py content... Make sure to remove your username and password first
`from instapy import InstaPy
# Write your automation here
# Stuck ? Look at the github page or the examples in the examples folder
dont_like = ['food', 'girl', 'hot']
ignore_words = ['pizza']
friend_list = ['friend1', 'friend2', 'friend3']
# If you want to enter your Instagram Credentials directly just enter
# username=<your-username-here> and password=<your-password> into InstaPy
# e.g like so InstaPy(username="instagram", password="test1234")
InstaPy()\
.login(username="", password="")\
.set_upper_follower_count(limit = 2500) \
.set_do_comment(True, percentage=10) \
.set_comments(['Cool!', 'Awesome!', 'Nice!']) \
.set_dont_include(friend_list) \
.set_dont_like(dont_like) \
.set_ignore_if_contains(ignore_words) \
.like_by_tags(['dog', '#cat'], amount=100) \
.end()
`
@Josh452 did you place the chrome driver for your system in /assets?
Yes
@Josh452 Please add nogui=True into InstaPy()
like this:
InstaPy(nogui=True)
Just tryed that, got this.
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/common/service.py", line 64, in start
stdout=self.log_file, stderr=self.log_file)
File "/usr/lib/python3.5/subprocess.py", line 947, in __init__
restore_signals, start_new_session)
File "/usr/lib/python3.5/subprocess.py", line 1551, in _execute_child
raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: './assets/chromedriver'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "InstaPy/quickstart.py", line 14, in <module>
InstaPy(InstaPy(nogui=True))\
File "/home/ubuntu/InstaPy/instapy/instapy.py", line 37, in __init__
self.browser = webdriver.Chrome('./assets/chromedriver', chrome_options=chrome_options)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/chrome/webdriver.py", line 62, in __init__
self.service.start()
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/common/service.py", line 71, in start
os.path.basename(self.path), self.start_error_message)
selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home
Exception ignored in: <bound method Service.__del__ of <selenium.webdriver.chrome.service.Service object at 0x7f8a4676a860>>
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/common/service.py", line 163, in __del__
self.stop()
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/common/service.py", line 135, in stop
if self.process is None:
AttributeError: 'Service' object has no attribute 'process'
I could give you server access if you wish, I don't know what could be wrong. I'm running it on an AWS Linux server with 1gb on ram
@Josh452
You need to instantiate it with the nogui, not with itself.
Trey changing your line 14 to:
InstaPy(username="YOUR_USERNAME", password="YOUR_PASSWORD", nogui=True)
The login call don't need any argument, username and password goes into the constructor.
Changed it, still get this
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/common/service.py", line 64, in start
stdout=self.log_file, stderr=self.log_file)
File "/usr/lib/python3.5/subprocess.py", line 947, in __init__
restore_signals, start_new_session)
File "/usr/lib/python3.5/subprocess.py", line 1551, in _execute_child
raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: './assets/chromedriver'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "InstaPy/quickstart.py", line 14, in <module>
InstaPy(InstaPy(username="", password="", nogui=True))\
File "/home/ubuntu/InstaPy/instapy/instapy.py", line 37, in __init__
self.browser = webdriver.Chrome('./assets/chromedriver', chrome_options=chrome_options)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/chrome/webdriver.py", line 62, in __init__
self.service.start()
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/common/service.py", line 71, in start
os.path.basename(self.path), self.start_error_message)
selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home
Exception ignored in: <bound method Service.__del__ of <selenium.webdriver.chrome.service.Service object at 0x7f28b1ac5898>>
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/common/service.py", line 163, in __del__
self.stop()
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/common/service.py", line 135, in stop
if self.process is None:
AttributeError: 'Service' object has no attribute 'process'
Your traceback is showing that you are calling InstaPy with InstaPy.
File "InstaPy/quickstart.py", line 14, in <module>
InstaPy(InstaPy(username="", password="", nogui=True))\
Don't do that. Just call InstaPy with it's proper arguments. i.e.
InstaPy(username="", password="", nogui=True) \
Thank you, now there is only 1 error atm
File "InstaPy/quickstart.py", line 16
.set_upper_follower_count(limit = 2500) \
^
IndentationError: unexpected indent
@Josh452 Good, but I think the error is pretty clear, isn't it? Just make sure to use the right number of indentation (spaces) in front of the call.
Fixed it, missing a back slash. Now im back to this.
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/common/service.py", line 64, in start
stdout=self.log_file, stderr=self.log_file)
File "/usr/lib/python3.5/subprocess.py", line 947, in __init__
restore_signals, start_new_session)
File "/usr/lib/python3.5/subprocess.py", line 1551, in _execute_child
raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: './assets/chromedriver'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "InstaPy/quickstart.py", line 14, in <module>
InstaPy(username="", password="", nogui=True)\
File "/home/ubuntu/InstaPy/instapy/instapy.py", line 37, in __init__
self.browser = webdriver.Chrome('./assets/chromedriver', chrome_options=chrome_options)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/chrome/webdriver.py", line 62, in __init__
self.service.start()
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/common/service.py", line 71, in start
os.path.basename(self.path), self.start_error_message)
selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home
Exception ignored in: <bound method Service.__del__ of <selenium.webdriver.chrome.service.Service object at 0x7f9aa8145860>>
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/common/service.py", line 163, in __del__
self.stop()
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/common/service.py", line 135, in stop
if self.process is None:
AttributeError: 'Service' object has no attribute 'process'
@Josh452 Please show me the content of /assets

Here :) The chromedriver is in there.
How are you starting InstaPy via ssh? Are you navigating to your folder first with cd or do you something like python /home/ubuntu/InstaPy/quickstart.py?
I had a similar error mentioned in #205.
Yes I am useing SSH. I tryed cding and got this
Traceback (most recent call last):
File "quickstart.py", line 14, in <module>
InstaPy(username="", password="", nogui=True)\
File "/home/ubuntu/InstaPy/instapy/instapy.py", line 37, in __init__
self.browser = webdriver.Chrome('./assets/chromedriver', chrome_options=chrome_options)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/chrome/webdriver.py", line 62, in __init__
self.service.start()
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/common/service.py", line 86, in start
self.assert_process_still_running()
File "/usr/local/lib/python3.5/dist-packages/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
@Josh452 Could you check back at the RAM of the Server?
This looks like a problem of too less power...
Also make sure to restart the server reboot after looking into ps aux to see how many instances of the xvfb process are started.
If the InstaPy run get's aborted, by now, the virtual display does not end... This leads to a memory leak which stops the server from working correctly... So please reboot before trying again
Also to add what @timgrossmann said, once you've done that, make sure to build the code again.
I had a similar error, I took the latest version and ran the setup again and it worked!
So git pull and setup! 馃
I changed instapy/instapy.py line 37
self.browser = webdriver.Chrome('./assets/chromedriver', chrome_options=chrome_options)
to
self.browser = webdriver.Firefox()
worked fine in my linux server.
Most helpful comment
Are you running on a server?
try adding
nogui=Trueto the IntaPy constructor.