Hi,
I followed your instructions on how to install the bot on a CentOs VPS.
When I try to run the quickstart.py I get this error message:
File "quickstart.py", line 1, in <module>
from instapy import InstaPy
File "/root/InstaPy/instapy/__init__.py", line 1, in <module>
from .instapy import InstaPy
File "/root/InstaPy/instapy/instapy.py", line 5, in <module>
from pyvirtualdisplay import Display
ImportError: No module named 'pyvirtualdisplay'
Is this how the quick start should look:
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(username='XXXXXXXXX', password='XXXXXXXXX')\
.login()\
.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) \
.set_do_follow(enabled=True, percentage=30, times=2) \
.like_by_tags(['dog', '#cat'], amount=100) \
.end()
Is this correct?
@bigdropgr looks like this is a problem with the setup docs about centOS...
My recommendation would be to simply use Ubuntu unless you got a good reason to use CentOS 馃槈
Ok I will switch to Ubuntu and let you know if I face any problem.
Thank you @timgrossmann !!
@timgrossmann Do I need to run my server on any specific Ubuntu version or it does not really matter?
@bigdropgr Don't you use DigitalOcean?
I don't think the ubuntu version is too important... But I actually didn't test it with ever version out there
@timgrossmann I do not use DO.
I installed Ubuntu 14.04.
I am getting an error while I'm following the installation process.
The error is :
sudo apt-get install -y -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up google-chrome-stable (58.0.3029.110-1) ...
xdg-icon-resource: No writable system icon directory found.
dpkg: error processing package google-chrome-stable (--configure):
subprocess installed post-installation script returned error exit status 3
Errors were encountered while processing:
google-chrome-stable
E: Sub-process /usr/bin/dpkg returned an error code (1)
What is this?
@timgrossmann When I run python3 quickstart.py I get this error:
Traceback (most recent call last):
File "quickstart.py", line 14, in <module>
InstaPy(username='XXXXXXXX', password='XXXXXXXX')\
File "/root/InstaPy/instapy/instapy.py", line 38, in __init__
self.browser = webdriver.Chrome('./assets/chromedriver', chrome_options=chrome_options)
File "/usr/local/lib/python3.4/dist-packages/selenium/webdriver/chrome/webdriver.py", line 69, in __init__
desired_capabilities=desired_capabilities)
File "/usr/local/lib/python3.4/dist-packages/selenium/webdriver/remote/webdriver.py", line 90, in __init__
self.start_session(desired_capabilities, browser_profile)
File "/usr/local/lib/python3.4/dist-packages/selenium/webdriver/remote/webdriver.py", line 177, in start_session
response = self.execute(Command.NEW_SESSION, capabilities)
File "/usr/local/lib/python3.4/dist-packages/selenium/webdriver/remote/webdriver.py", line 236, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python3.4/dist-packages/selenium/webdriver/remote/errorhandler.py", line 192, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally
(Driver info: chromedriver=2.29.461571 (8a88bbe0775e2a23afda0ceaf2ef7ee74e822cc5),platform=Linux 3.13.0-117-generic x86_64)
and if I run the python quickstart.py
I get this error:
Traceback (most recent call last):
File "quickstart.py", line 1, in <module>
from instapy import InstaPy
File "/root/InstaPy/instapy/__init__.py", line 1, in <module>
from .instapy import InstaPy
File "/root/InstaPy/instapy/instapy.py", line 5, in <module>
from pyvirtualdisplay import Display
ImportError: No module named pyvirtualdisplay
I also tried apt list --installed | grep Xvfb
and I get this error:
WARNING: apt does not have a stable CLI interface yet. Use with caution in scripts.
What am I doing wrong?
@timgrossmann It did not work, so I thought it was some kind of installation problem.
I created a new vps with ubuntu 17 installed. I am following the installation process for ubuntu.
When I run sudo dpkg -i google-chrome-stable_current_amd64.deb
I am getting this error:
Selecting previously unselected package google-chrome-stable.
(Reading database ... 100502 files and directories currently installed.)
Preparing to unpack google-chrome-stable_current_amd64.deb ...
Unpacking google-chrome-stable (58.0.3029.110-1) ...
dpkg: dependency problems prevent configuration of google-chrome-stable:
google-chrome-stable depends on gconf-service; however:
Package gconf-service is not installed.
google-chrome-stable depends on libasound2 (>= 1.0.16); however:
Package libasound2 is not installed.
google-chrome-stable depends on libatk1.0-0 (>= 1.12.4); however:
Package libatk1.0-0 is not installed.
google-chrome-stable depends on libcairo2 (>= 1.2.4); however:
Package libcairo2 is not installed.
google-chrome-stable depends on libcups2 (>= 1.4.0); however:
Package libcups2 is not installed.
google-chrome-stable depends on libfontconfig1 (>= 2.9.0); however:
Package libfontconfig1 is not installed.
google-chrome-stable depends on libgconf-2-4 (>= 2.31.1); however:
Package libgconf-2-4 is not installed.
google-chrome-stable depends on libgdk-pixbuf2.0-0 (>= 2.22.0); however:
Package libgdk-pixbuf2.0-0 is not installed.
google-chrome-stable depends on libgtk2.0-0 (>= 2.24.0); however:
Package libgtk2.0-0 is not installed.
google-chrome-stable depends on libnspr4 (>= 2:4.9-2~) | libnspr4-0d (>= 1.8.0.10) | libnspr4 (>= 4.9.5-0ubuntu0); however:
Package libnspr4 is not installed.
Package libnspr4-0d is not installed.
Package libnspr4 is not installed.
google-chrome-stable depends on libnss3 (>= 2:3.13.4-2~) | libnss3-1d (>= 3.12.4); however:
Package libnss3 is not installed.
Package libnss3-1d is not installed.
google-chrome-stable depends on libpango1.0-0 (>= 1.14.0); however:
Package libpango1.0-0 is not installed.
google-chrome-stable depends on libxcomposite1 (>= 1:0.3-1); however:
Package libxcomposite1 is not installed.
google-chrome-stable depends on libxcursor1 (>> 1.1.2); however:
Package libxcursor1 is not installed.
google-chrome-stable depends on libxi6 (>= 2:1.2.99.4); however:
Package libxi6 is not installed.
google-chrome-stable depends on libxrandr2 (>= 2:1.2.99.3); however:
Package libxrandr2 is not installed.
google-chrome-stable depends on libxrender1; however:
Package libxrender1 is not installed.
google-chrome-stable depends on libxss1; however:
Package libxss1 is not installed.
google-chrome-stable depends on libxtst6; however:
Package libxtst6 is not installed.
google-chrome-stable depends on fonts-liberation; however:
Package fonts-liberation is not installed.
google-chrome-stable depends on libappindicator1; however:
Package libappindicator1 is not installed.
google-chrome-stable depends on libnss3 (>= 3.17.2); however:
Package libnss3 is not installed.
google-chrome-stable depends on xdg-utils (>= 1.0.2); however:
Package xdg-utils is not installed.
dpkg: error processing package google-chrome-stable (--install):
dependency problems - leaving unconfigured
Processing triggers for mime-support (3.60ubuntu1) ...
Processing triggers for man-db (2.7.6.1-2) ...
Errors were encountered while processing:
google-chrome-stable
@timgrossmann I created a new droplet (running Ubuntu) on Digital Ocean.
I get the exact same errors on that vps also.
@bigdropgr Did you follow the advanced setup on in the "how to Ubuntu"?
You have to install it top down 馃槈
@timgrossmann I followed everything.... No luck!
So I will create a new droplet with ubuntu 16.04 x64.
Then I will follow the instructions fund here . I just need to follow everything from the Advanced Installation and below, correct?
Let's give it one more try!!
@bigdropgr Yes, just make sure to copy every command without the "$".
I did this like 7 times now, this actually works like charm 馃槈
@timgrossmann while installing it again on a clean vps, on the last step of the General dependencies when i run
pip3 install --upgrade pip
I get this message
Requirement already up-to-date: pip in /usr/local/lib/python3.5/dist-packages
On the Chrome-stable on the step
sudo dpkg -i google-chrome-stable_current_amd64.deb
I get this message
Selecting previously unselected package google-chrome-stable.
(Reading database ... 61996 files and directories currently installed.)
Preparing to unpack google-chrome-stable_current_amd64.deb ...
Unpacking google-chrome-stable (58.0.3029.110-1) ...
dpkg: dependency problems prevent configuration of google-chrome-stable:
google-chrome-stable depends on gconf-service; however:
Package gconf-service is not installed.
google-chrome-stable depends on libasound2 (>= 1.0.16); however:
Package libasound2 is not installed.
google-chrome-stable depends on libatk1.0-0 (>= 1.12.4); however:
Package libatk1.0-0 is not installed.
google-chrome-stable depends on libcairo2 (>= 1.2.4); however:
Package libcairo2 is not installed.
google-chrome-stable depends on libcups2 (>= 1.4.0); however:
Package libcups2 is not installed.
google-chrome-stable depends on libfontconfig1 (>= 2.9.0); however:
Package libfontconfig1 is not installed.
google-chrome-stable depends on libgconf-2-4 (>= 2.31.1); however:
Package libgconf-2-4 is not installed.
google-chrome-stable depends on libgdk-pixbuf2.0-0 (>= 2.22.0); however:
Package libgdk-pixbuf2.0-0 is not installed.
google-chrome-stable depends on libgtk2.0-0 (>= 2.24.0); however:
Package libgtk2.0-0 is not insta
dpkg: error processing package google-chrome-stable (--install):
dependency problems - leaving unconfigured
Processing triggers for mime-support (3.59ubuntu1) ...
Processing triggers for man-db (2.7.5-1) ...
Errors were encountered while processing:
google-chrome-stable
After following the step by step process, I tried the script with the :
python3 quickstart.py
And I get this message:
Traceback (most recent call last):
File "quickstart.py", line 14, in <module>
InstaPy(username="XXXXXXXXX", password="XXXXXXXXX")\
File "/root/InstaPy/instapy/instapy.py", line 38, 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 69, in __init__
desired_capabilities=desired_capabilities)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/webdriver.py", line 90, in __init__
self.start_session(desired_capabilities, browser_profile)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/webdriver.py", line 177, in start_session
response = self.execute(Command.NEW_SESSION, capabilities)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/webdriver.py", line 236, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/errorhandler.py", line 192, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally
(Driver info: chromedriver=2.29.461571 (8a88bbe0775e2a23afda0ceaf2ef7ee74e822cc5),platform=Linux 4.4.0-78-generic x86_64)
Is everything ok? What am I doing wrong? Maybe it is a bug?
@timgrossmann any possible fix for this?
Thank you!!
Im having the exact same issue.
How much memory?
You need at least 1GB of memory for it to work.
I got 1GB memory.
I also have 1gb!
@timgrossmann Exact same messages while installing and the same output when I try to run quickstart.py on a fresh created droplet with 4GB and Ubuntu.
So I guess it is not ram issue. Maybe we are doing something wrong and no one can guess what we are doing wrong.
So I am saying again. On a newly created vps on Digital Ocean, with 4GB ram and Ubuntu 16.04.2 installed, I install all the needed software by following the steps I found here: https://github.com/timgrossmann/InstaPy/blob/master/docs/How_To_DO_Ubuntu.md#general-dependencies
I follow everything from General Dependencies and below. Is that correct?
@bigdropgr Weird 馃 ...
Yes that's correct. Simply execute every command separately.
@Mkohm Any luck with installing the InstaPy? Did you figure this out?
@timgrossmann Can I provide any farther info to help you help me?
Thank you!
@timgrossmann is it possible that I will give you access to my server and you will check what is going on?
Can you please mail me at bigdropgr (at) gmail.com so I will give you my login credentials?
Thank you
@bigdropgr Well, actually no, sorry... If I start doing that, especially for free, I'm covered for the rest of the year...
I will record a video on the server setup tomorrow or so and upload that to youtube...
@timgrossmann Hi, did you have time to record the video?
Can I ask you something very simple... Since we both use Digital Ocean, and we both have an Ubuntu server with at least 1GB ram, and we follow the exact same step by step procedure, what can be causing the error??
Thank you!
@bigdropgr I'm sorry, I wanted to do it, but I, to be honest, currently can't afford paying money to set up a droplet simply to record a video... I'm sorry.
I wanted to make a full video from the Link here on github to the set up server.
If you want to I could make one with an already created server and just from an empty server to the working script.
Hmm... actually I have no idea what the problem is... Maybe there are some area specific errors, which "Location" did you choose for your server?
What I do is, I simply copy every command from the "How_to" and execute it. Done and working
@timgrossmann I have an idea. If you write me your email I can send you the login credentials to a feshly created vps. You can use it to set up the bot and record the video and I will have the bot working, since I cannot do it myself.
I also thought that this could be a location problem so I tried different locations, both in usa and Europe .
I tried at least 5 different locations.
@bigdropgr
I'm sorry, I can't set it up for yourself, you have to do it on your own.
I can also set up a new droplet, just wanted to do a full video for the people having problems.
But I see when I can set it up and then I'll post the video, even though it will be boring as hell 馃槃
@bigdropgr
InstaPy(username='XXXXXXXXX', password='XXXXXXXXX')
should be:
InstaPy(username='XXXXXXXXX', password='XXXXXXXXX', nogui=True)
@sdiepend @bigdropgr How could I miss that... Thank you!!!
@sdiepend Thank you man!!!
That was the problem!!