hello
i get this issue when ever i run any of my scripts
Traceback (most recent call last):
File "example.py", line 5, in
session = InstaPy(username='xxx', password='xxx')
NameError: name 'InstaPy' is not defined
@holumiede copy examples/exemple.py to ../ (home directory of InstaPy)
@converge thanks i did that but then i got this
Traceback (most recent call last):
File "/home/bakertech/INSTA/InstaPy/example.py", line 2, in
from instapy import InstaPy
File "/home/bakertech/INSTA/InstaPy/instapy/__init__.py", line 1, in
from .instapy import InstaPy
File "/home/bakertech/INSTA/InstaPy/instapy/instapy.py", line 8, in
from pyvirtualdisplay import Display
ModuleNotFoundError: No module named 'pyvirtualdisplay'
which python version ? (pip install pyvirtualdisplay or pip3 or pip3.x ...)
i installed chrome and then i got this... plus it opens a chrome tab not sure if its supposed to do so
Traceback (most recent call last):
File "example.py", line 9, in
session.login()
File "/root/Downloads/InstaPy-master/instapy/instapy.py", line 154, in login
if not login_user(self.browser, self.username, self.password, self.switch_language):
File "/root/Downloads/InstaPy-master/instapy/login_util.py", line 28, in login_user
action = ActionChains(browser).move_to_element(input_username[0]).click().send_keys(username).perform()
IndexError: list index out of range
Make sure to get the right chromedriver for your system from here. Just put it in /assets.
Hi guys since this morning I have the same error:
Traceback (most recent call last):
File "example.py", line 2, 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 8, in <module>
from pyvirtualdisplay import Display
ImportError: No module named pyvirtualdisplay
I've created a new directory for instapy and I start over the installation process.
but I still have that issue.
@emanuelepasin if you run the script in this way:
python script_name.py
do:
python --version
if it shows python 3.x:
pip3 install pyvirtualdisplay
if it shows python 2.x:
pip install pyvirtualdisplay
if pyvirtualdisplay is already installed, try to update it
pip (or pip3) install -U pyvirtualdisplay
@converge unfortunately I've already tried:
root@ubuntu-1gb-ams2-01:~/InstaPy# python --version
Python 2.7.12
root@ubuntu-1gb-ams2-01:~/InstaPy# pip install pyvirtualdisplay
Requirement already satisfied: pyvirtualdisplay in /usr/local/lib/python3.5/dist-packages/PyVirtualDisplay-0.2.1-py3.5.egg
Requirement already satisfied: EasyProcess in /usr/local/lib/python3.5/dist-packages/EasyProcess-0.2.3-py3.5.egg (from pyvirtualdisplay)
root@ubuntu-1gb-ams2-01:~/InstaPy# pip install -U pyvirtualdisplay
Requirement already up-to-date: pyvirtualdisplay in /usr/local/lib/python3.5/dist-packages/PyVirtualDisplay-0.2.1-py3.5.egg
Requirement already up-to-date: EasyProcess in /usr/local/lib/python3.5/dist-packages/EasyProcess-0.2.3-py3.5.egg (from pyvirtualdisplay)
root@ubuntu-1gb-ams2-01:~/InstaPy# python example.py
Traceback (most recent call last):
File "example.py", line 2, 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 8, in <module>
from pyvirtualdisplay import Display
ImportError: No module named pyvirtualdisplay
@emanuelepasin your pip is setup to use python 3 and your python setup is using python 2.7, you just need to install pyvirtualdisplay to python 2.7
pip2.7 install pyvirtualdisplay
@converge It didn't work, so I've created a new server and started over!
@timgrossmann any idea ?
There is no interaction for a long time, please reopen it if you still need some help.