Instapy: The update did not work. ( failed to load desired amount )

Created on 17 Jan 2019  路  60Comments  路  Source: timgrossmann/InstaPy

Expected Behavior

I want f0llow someone's followers. I update my files after " failed to load desired amount " error. But I take new error.

Current Behavior

Possible Solution (optional)

InstaPy configuration

"""
This template is written by @zackvega

What does this quickstart script aim to do?

  • This is my simple but effective script.
    """

from instapy import InstaPy
from instapy.util import smart_run

insta_username = 'xxxk'
insta_password = 'axx11'

get a session!

session = InstaPy(username=insta_username,
password=insta_password,
headless_browser=True,
multi_logs=True,
page_delay=7)

let's go! :>

with smart_run(session):
# general settings
session.set_relationship_bounds(enabled=True,
potency_ratio=None,
delimit_by_numbers=True,
max_followers=100000,
max_following=5000,
min_followers=150,
min_following=100)
session.set_skip_users(skip_private=False)

# activity
session.set_user_interact(amount=3, randomize=True, percentage=50, media='Photo')
session.follow_user_followers(['kadirozcaaan'], amount=2220, randomize=False, interact=True, sleep_delay=3800)

Terminal

OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
INFO [2019-01-17 00:58:22] [kblycolak] Session started!
oooooooooooooooooooooooooooooooooooooooooooooooooooooo

...............................................................
INFO [2019-01-17 00:58:43] [kblycolak] Logged in successfully!
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
INFO [2019-01-17 00:58:43] [kblycolak] Saving account progress...


INFO [2019-01-17 00:58:47] [kblycolak] Starting to follow user Followers..
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
INFO [2019-01-17 00:58:47] [kblycolak] User 'kadirozcaaan' [1/1]
ERROR [2019-01-17 01:01:36] [kblycolak] Error occurred while deleting cookies from web browser!
b'Message: invalid session id\n (Driver info: chromedriver=2.45.615291 (ec3682e3c9061c10f26ea9e5cdcf3c53f3f74387),platform=Windows NT 6.1.7601 SP1 x86_64)\n'
Traceback (most recent call last):
File "C:\Users\WIN7\Desktop\InstaPy-master\instapy\util.py", line 1600, in smart_run
yield
File "qq.py", line 42, in
session.follow_user_followers(['kadirozcaaan'], amount=2220, randomize=False, interact=True, sleep_delay=3800)
File "C:\Users\WIN7\Desktop\InstaPy-master\instapy\instapy.py", line 3048, in follow_user_followers
self.logfolder)
File "C:\Users\WIN7\Desktop\InstaPy-master\instapy\unfollow_util.py", line 998, in get_given_user_followers
logger, logfolder)
File "C:\Users\WIN7\Desktop\InstaPy-master\instapy\unfollow_util.py", line 741, in get_users_through_dialog
dialog = browser.find_element_by_xpath(dialog_address)
File "C:\Users\WIN7\AppData\Local\Programs\Python\Python37-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 394, in find_element_by_xpath
return self.find_element(by=By.XPATH, value=xpath)
File "C:\Users\WIN7\AppData\Local\Programs\Python\Python37-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 978, in find_element
'value': value})['value']
File "C:\Users\WIN7\AppData\Local\Programs\Python\Python37-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "C:\Users\WIN7\AppData\Local\Programs\Python\Python37-32\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: session deleted because of page crash
from unknown error: cannot determine loading status
from tab crashed
(Session info: headless chrome=71.0.3578.98)
(Driver info: chromedriver=2.45.615291 (ec3682e3c9061c10f26ea9e5cdcf3c53f3f74387),platform=Windows NT 6.1.7601 SP1 x86_64)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\WIN7\Desktop\InstaPy-master\instapy\browser.py", line 186, in close_browser
browser.delete_all_cookies()
File "C:\Users\WIN7\AppData\Local\Programs\Python\Python37-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 878, in delete_all_cookies
self.execute(Command.DELETE_ALL_COOKIES)
File "C:\Users\WIN7\AppData\Local\Programs\Python\Python37-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "C:\Users\WIN7\AppData\Local\Programs\Python\Python37-32\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: invalid session id
(Driver info: chromedriver=2.45.615291 (ec3682e3c9061c10f26ea9e5cdcf3c53f3f74387),platform=Windows NT 6.1.7601 SP1 x86_64)

INFO [2019-01-17 01:01:38] [kblycolak] Sessional Live Report:
|> No any statistics to show

On session start was FOLLOWING 3120 users & had 2676 FOLLOWERS
[Session lasted 3.31 minutes]

OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
INFO [2019-01-17 01:01:38] [kblycolak] Session ended!
oooooooooooooooooooooooooooooooooooooooooooooooooooooo

Traceback (most recent call last):
File "qq.py", line 42, in
session.follow_user_followers(['kadirozcaaan'], amount=2220, randomize=False, interact=True, sleep_delay=3800)
File "C:\Users\WIN7\Desktop\InstaPy-master\instapy\instapy.py", line 3048, in follow_user_followers
self.logfolder)
File "C:\Users\WIN7\Desktop\InstaPy-master\instapy\unfollow_util.py", line 998, in get_given_user_followers
logger, logfolder)
File "C:\Users\WIN7\Desktop\InstaPy-master\instapy\unfollow_util.py", line 741, in get_users_through_dialog
dialog = browser.find_element_by_xpath(dialog_address)
File "C:\Users\WIN7\AppData\Local\Programs\Python\Python37-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 394, in find_element_by_xpath
return self.find_element(by=By.XPATH, value=xpath)
File "C:\Users\WIN7\AppData\Local\Programs\Python\Python37-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 978, in find_element
'value': value})['value']
File "C:\Users\WIN7\AppData\Local\Programs\Python\Python37-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "C:\Users\WIN7\AppData\Local\Programs\Python\Python37-32\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: session deleted because of page crash
from unknown error: cannot determine loading status
from tab crashed
(Session info: headless chrome=71.0.3578.98)
(Driver info: chromedriver=2.45.615291 (ec3682e3c9061c10f26ea9e5cdcf3c53f3f74387),platform=Windows NT 6.1.7601 SP1 x86_64)

wontfix

Most helpful comment

Yes, @cormo1990

That kind of bug has happened before.
It is so ridiculous and will capture more than 1000 MB of memory if you do not stop it.

In particalar, for that case, the process triggering it is a graphql query with these parameters,

query_hash: c56ee0ae1f89cdbd1c89e2bc6b8f3d18
variables: {"id":"123","include_reel":true,"fetch_mutual":false,"first":24}

I think it is a general case and other parts of the service is also expected to behave so.

BTW, unlike Firefox and Chrome, Edge browser is not affected by those glitches 馃檪
If you visit websites like downdetector dot com, you'll see that issues with the service has been increased by ~5 times from 17th January (_today_).


Cheers 馃榿

All 60 comments

Yep, the fix which was done by @uluQulu 7 hours ago does not work. The script does not even open followers window now, and "timeout" ;)

Same for me, stopped working again....

The script times out. I'm curious what Instagram changed this time.

Yes!
Error occurred while deleting cookies from web browser!

same for me, keeps thinking and then it quits with the same error as above written

Yep, the fix which was done by @uluQulu 7 hours ago does not work. The script does not even open followers window now, and "timeout" ;)

My fix was not intended for that part, @Tachenz 馃ズ
That is a huge bug in the server side you're observing at the moment.

My fix was not intended for that part, @Tachenz 馃ズ
That is a huge bug in the server side you're observing at the moment.

seems like it

Yes, same here. Unfollow works fine now

python3 InstaPy/supertr1pperke-follow-unfollow.py

OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
INFO [2019-01-17 08:25:08] [supertr1pperke] Session started!
oooooooooooooooooooooooooooooooooooooooooooooooooooooo

....................................................................
INFO [2019-01-17 08:25:44] [supertr1pperke] Logged in successfully!
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
INFO [2019-01-17 08:25:44] [supertr1pperke] Saving account progress...


INFO [2019-01-17 08:25:47] [supertr1pperke] Starting to follow user Followers..
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
INFO [2019-01-17 08:25:47] [supertr1pperke] User 'nini' [1/7]
ERROR [2019-01-17 08:32:53] [supertr1pperke] Error occurred while deleting cookies from web browser!
b'Message: unknown error: session deleted because of page crash\nfrom unknown error: cannot determine loading status\nfrom tab crashed\n (Session info: headless chrome=71.0.3578.98)\n (Driver info: chromedriver=2.45.615279 (12b89733300bd268cff3b78fc76cb8f3a7cc44e5),platform=Linux 4.18.0-13-generic x86_64)\n'
Traceback (most recent call last):
File "/home/steven/InstaPy/instapy/util.py", line 1600, in smart_run
yield
File "InstaPy/supertr1pperke-follow-unfollow.py", line 21, in
session.follow_user_followers(['nini','vegan','veganbowls','veganinformation','iloveleuven','veganladyboss','athleticawesome'], amount=20, randomize=True, interact=False)
File "/home/steven/InstaPy/instapy/instapy.py", line 3048, in follow_user_followers
self.logfolder)
File "/home/steven/InstaPy/instapy/unfollow_util.py", line 998, in get_given_user_followers
logger, logfolder)
File "/home/steven/InstaPy/instapy/unfollow_util.py", line 741, in get_users_through_dialog
dialog = browser.find_element_by_xpath(dialog_address)
File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/webdriver.py", line 394, in find_element_by_xpath
return self.find_element(by=By.XPATH, value=xpath)
File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/webdriver.py", line 978, in find_element
'value': value})['value']
File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.TimeoutException: Message: timeout
(Session info: headless chrome=71.0.3578.98)
(Driver info: chromedriver=2.45.615279 (12b89733300bd268cff3b78fc76cb8f3a7cc44e5),platform=Linux 4.18.0-13-generic x86_64)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/steven/InstaPy/instapy/browser.py", line 186, in close_browser
browser.delete_all_cookies()
File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/webdriver.py", line 878, in delete_all_cookies
self.execute(Command.DELETE_ALL_COOKIES)
File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: session deleted because of page crash
from unknown error: cannot determine loading status
from tab crashed
(Session info: headless chrome=71.0.3578.98)
(Driver info: chromedriver=2.45.615279 (12b89733300bd268cff3b78fc76cb8f3a7cc44e5),platform=Linux 4.18.0-13-generic x86_64)

INFO [2019-01-17 08:32:53] [supertr1pperke] Sessional Live Report:
|> No any statistics to show

On session start was FOLLOWING 538 users & had 1070 FOLLOWERS
[Session lasted 7.93 minutes]

OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
INFO [2019-01-17 08:32:53] [supertr1pperke] Session ended!
ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo

Traceback (most recent call last):
File "InstaPy/supertr1pperke-follow-unfollow.py", line 21, in
session.follow_user_followers(['nini','vegan','veganbowls','veganinformation','iloveleuven','veganladyboss','athleticawesome'], amount=20, randomize=True, interact=False)
File "/home/steven/InstaPy/instapy/instapy.py", line 3048, in follow_user_followers
self.logfolder)
File "/home/steven/InstaPy/instapy/unfollow_util.py", line 998, in get_given_user_followers
logger, logfolder)
File "/home/steven/InstaPy/instapy/unfollow_util.py", line 741, in get_users_through_dialog
dialog = browser.find_element_by_xpath(dialog_address)
File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/webdriver.py", line 394, in find_element_by_xpath
return self.find_element(by=By.XPATH, value=xpath)
File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/webdriver.py", line 978, in find_element
'value': value})['value']
File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.TimeoutException: Message: timeout
(Session info: headless chrome=71.0.3578.98)
(Driver info: chromedriver=2.45.615279 (12b89733300bd268cff3b78fc76cb8f3a7cc44e5),platform=Linux 4.18.0-13-generic x86_64)

if i only unfollow it works perfectly, without any isseu
but if if load my follow-unfollow conf it doesn't work
and that follow-unfollow conf file worked already 2 months now and i didn't adjust it

Got the same issue with only unfollow. It goes to profile page but following dialog never appears, then script times out with this:

ERROR [2019-01-17 08:29:49] [accoutname] Error occurred while deleting cookies from web browser!
b'Message: invalid session id\n (Driver info: chromedriver=2.45.615355 (d5698f682d8b2742017df6c81e0bd8e6a3063189),platform=Mac OS X 10.14.2 x86_64)\n'
Traceback (most recent call last):

error goes on but this seems to be most important

I've got the same issue, can't open the followers window list from the user.
@uluQulu is the problem regarding an instagram bug?

Yes, @cormo1990

That kind of bug has happened before.
It is so ridiculous and will capture more than 1000 MB of memory if you do not stop it.

In particalar, for that case, the process triggering it is a graphql query with these parameters,

query_hash: c56ee0ae1f89cdbd1c89e2bc6b8f3d18
variables: {"id":"123","include_reel":true,"fetch_mutual":false,"first":24}

I think it is a general case and other parts of the service is also expected to behave so.

BTW, unlike Firefox and Chrome, Edge browser is not affected by those glitches 馃檪
If you visit websites like downdetector dot com, you'll see that issues with the service has been increased by ~5 times from 17th January (_today_).


Cheers 馃榿

@uluQulu Thanks friend, i hope that it will be fixed as soon as possible ;)

+1

same

Yep, the fix which was done by @uluQulu 7 hours ago does not work. The script does not even open followers window now, and "timeout" ;)

My fix was not intended for that part, @Tachenz 馃ズ
That is a huge bug in the server side you're observing at the moment.

Oh, I see... What can we do but wait then :)

I think it's a global issue, I tested on two different account on Rpi and DigitalOcean and it's always the same error...

What server side are we talking about? Our own server?

same

Ok it's an Instagram problem:

  • Go on a IG profile in your browser
  • Click on 'followers'
  • Browser is freezing and dialog does not appear

I encountered this problem because of a delay in response time: [0117/120217.856:WARNING:spdy_session.cc(3144)] Received HEADERS for invalid stream

Timeout seems to be on method get_given_user_followers() due to the problem I said before

got the same problem since a couple of weeks

same Problem here

I probabily have the same issue when i try to unfollow.

INFO [2019-01-17 11:59:17] [ph4fun]  Session started!
oooooooooooooooooooooooooooooooooooooooooooooooooooooo


............................................................
INFO [2019-01-17 12:00:00] [ph4fun]  Logged in successfully!
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
INFO [2019-01-17 12:00:00] [ph4fun]  Saving account progress...

_________________________________________________________________
INFO [2019-01-17 12:00:09] [ph4fun]  Starting to unfollow users..
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
INFO [2019-01-17 12:00:09] [ph4fun]  Unfollowing the users you are following
ERROR [2019-01-17 12:03:59] [ph4fun]  Sorry, an error occurred: Message: unknown error: session deleted because of page crash
from unknown error: cannot determine loading status
from tab crashed
  (Session info: headless chrome=65.0.3325.181)
  (Driver info: chromedriver=2.36 (a81166ad79e68fbfe7cf5ba243192d6412e26b37),platform=Linux 4.14.79-v7+ armv7l)

ERROR [2019-01-17 12:03:59] [ph4fun]  Error occurred while deleting cookies from web browser!
        Message: no such session
  (Driver info: chromedriver=2.36 (a81166ad79e68fbfe7cf5ba243192d6412e26b37),platform=Linux 4.14.79-v7+ armv7l)
Traceback (most recent call last):
  File "/home/pi/Projects/InstaPy/instapy/browser.py", line 186, in close_browser
    browser.delete_all_cookies()
  File "/home/pi/.local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 878, in delete_all_cookies
    self.execute(Command.DELETE_ALL_COOKIES)
  File "/home/pi/.local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
    self.error_handler.check_response(response)
  File "/home/pi/.local/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
    raise exception_class(message, screen, stacktrace)
WebDriverException: Message: no such session
  (Driver info: chromedriver=2.36 (a81166ad79e68fbfe7cf5ba243192d6412e26b37),platform=Linux 4.14.79-v7+ armv7l)


INFO [2019-01-17 12:03:59] [ph4fun]  Sessional Live Report:
        |> No any statistics to show

On session start was FOLLOWING 2312 users & had 1801 FOLLOWERS
[Session lasted 4.76 minutes]

OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
INFO [2019-01-17 12:03:59] [ph4fun]  Session ended!
ooooooooooooooooooooooooooooooooooooooooooooooooooo

Funny is then you go to a profile from your feed the followers list do OPEN.
Bug/Block ?

When i open with Chromebrowser on desktop i also didnt work and browser freezes

@sionking I was wondering the same... It may be to block bots, as the webui was already very limited.
It's working on Safari iOS12 btw, a way to workaround the problem?

It might be hard to believed if it was a bug it would takes so much time to be fixed? Last time they massively released the new horizontal-scroll interface (end of december), they rollbacked in less than an hour.

I don't know, anyway I jsut disabled all :

@@ -912,6 +912,9 @@ def get_given_user_followers(browser,
    :param logfolder: the logger folder
    :return: list of user's followers also followed
    """

    return [], []

    user_name = user_name.strip()

    user_link = "https://www.instagram.com/{}/".format(user_name)
@@ -971,6 +974,7 @@ def get_given_user_following(browser,
                                jumps,
                                logger,
                                logfolder):
    return [], []
    user_name = user_name.strip()

@Herrox how to run on safari?
i guess someone has an idea to fix it...

@cormo1990 It was just a suggestion I'm not sure if it's really possible.
It's looks like there is a Safari driver for Selenium but it may require (a lot of ?) code rebuilding and new configuration

We can always like so the problem is just to get list of follower or following

yes, I would listen @uluQulu and @sionking what they think regarding the possibility to fix this action from instagram to block bot

It works on the mobile browser, maybe get to the mobiles website is a solution?

@uluQulu @sionking May be it's working with a mobile user agent. Do you know how and where to setup it? I guess in instapy/brower.py ?

Hey @Herrox
I wrote about it at https://github.com/timgrossmann/InstaPy/issues/1373#issuecomment-364160658 a year ago, not sure if it's changed by then,,

image


Cheers 馃榿

Hey @Herrox
I wrote about it at #1373 (comment) a year ago, not sure if it's changed by then,,

image

Cheers 馃榿

When I add in browser.py

mobile_emulation = { "deviceName": "Nexus 5" }
chrome_options.add_experimental_option("mobileEmulation", mobile_emulation)

The dom elements change in mobile version:

selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//div[3]/div/div/div[2]"}

mobile emulator on windows machine is OMG.
Lets just wait till tomorrow.

follow by tags worked for me last night. not sure if that is helpful in solving this issue but is a workaround if you want to keep your bot going.

yesterday evening around 22/23 in the evening it started working, it was down again after 5 in the morning

+1

A consequent problem is that Chrome get all the free memory... And last night my server crash... (Website included)

Hey @Herrox
I wrote about it at #1373 (comment) a year ago, not sure if it's changed by then,,
image

Cheers 馃榿

When I add in browser.py

mobile_emulation = { "deviceName": "Nexus 5" }
chrome_options.add_experimental_option("mobileEmulation", mobile_emulation)

The dom elements change in mobile version:

selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//div[3]/div/div/div[2]"}

Can you share your adjusted file?

So the solution right now should be:

  1. goto instagram feed page
  2. search the user we want to followers (full username)
  3. click on first result
  4. click on followers.

in unfollow_util.py:
from .util import search_and_click_first_element
and change the functions:
in get_given_user_following and in get_given_user_followers change:

    if True:
        user_found_in_search = search_and_click_first_element(browser,user_name, logger)
        if not user_found_in_search:
            return [], []
    else:
        user_link = "https://www.instagram.com/{}/".format(user_name)
        web_address_navigator(browser, user_link)

in util.py:

+def search_and_click_first_element(browser, search_value, logger):
    search_xpath = r'//*[@id="react-root"]/section/nav/div[2]/div/div/div[2]/div/div'
    search_element = browser.find_elements_by_xpath(search_xpath)

    (ActionChains(browser)
     .move_to_element(search_element[0])
     .click()
     .send_keys(search_value)
     .perform())

    first_results_xpath = r'//*[@id="react-root"]/section/nav/div[2]/div/div/div[2]/div[2]/div[2]/div/a[1]/div'
    element_vis = explicit_wait(browser, "VOEL", [first_results_xpath, "XPath"], logger, 5, False)

    if element_vis:
        first_results_element = browser.find_elements_by_xpath(first_results_xpath)
        element_vis = explicit_wait(browser, "VOEL", [first_results_xpath, "XPath"], logger, 5, False)

        if element_vis:
            click_element(browser, first_results_element[0])
            return True

    return False

is it possible to update the files also?

-- Seems that it back to normal !!! --

back to normal !

back to normal !

Mine still does not working :(

Back to normal. Thanks !

Resolved ! 馃帀

back to normal !

Mine still does not working :(

I deleted my instapy folder and i downloaded again. It is working now, on my digitalocean server.

Still error

same error here!!

@converge

Raspbian:

Traceback (most recent call last): File "instapy.py", line 63, in <module> session.follow_user_followers(['userxyz1','userxyz2', 'userxyz3'], amount=125, randomize=False, interact=False, sleep_delay=600) File "/home/pi/InstaPy/instapy/instapy.py", line 3048, in follow_user_followers self.logfolder) File "/home/pi/InstaPy/instapy/unfollow_util.py", line 998, in get_given_user_followers logger, logfolder) File "/home/pi/InstaPy/instapy/unfollow_util.py", line 745, in get_users_through_dialog scroll_to_bottom_of_followers_list(browser, dialog) File "/home/pi/InstaPy/instapy/unfollow_util.py", line 707, in scroll_to_bottom_of_followers_list "arguments[0].children[1].scrollIntoView()", element) File "/home/pi/.local/lib/python3.5/site-packages/selenium/webdriver/remote/webdriver.py", line 636, in execute_script 'args': converted_args})['value'] File "/home/pi/.local/lib/python3.5/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute self.error_handler.check_response(response) File "/home/pi/.local/lib/python3.5/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.WebDriverException: Message: unknown error: Cannot read property 'scrollIntoView' of undefined (Session info: headless chrome=65.0.3325.181) (Driver info: chromedriver=2.36 (a81166ad79e68fbfe7cf5ba243192d6412e26b37),platform=Linux 4.14.79-v7+ armv7l)

And...

` ._. ._. ._. ._. ._. ._. ._. ._.
Workspace in use: "/home/pi/InstaPy"

._. ._. ._. ._. ._. ._. ._. ._. ._. ._. ._. ._. ._. ._. ._. ._. ._. ._. ._. ._. ._.
INFO [2019-02-05 00:27:29] [my_login] Using built in instapy-chromedriver executable (version 2.46)
Traceback (most recent call last):
File "my_login.py", line 20, in
nogui=False)
File "/home/pi/InstaPy/instapy/instapy.py", line 276, in __init__
self.set_selenium_local_session()
File "/home/pi/InstaPy/instapy/instapy.py", line 326, in set_selenium_local_session
self.logger)
File "/home/pi/InstaPy/instapy/browser.py", line 123, in set_selenium_local_session
chrome_options=chrome_options)
File "/home/pi/.local/lib/python3.5/site-packages/selenium/webdriver/chrome/webdriver.py", line 73, in __init__
self.service.start()
File "/home/pi/.local/lib/python3.5/site-packages/selenium/webdriver/common/service.py", line 76, in start
stdin=PIPE)
File "/usr/lib/python3.5/subprocess.py", line 676, in __init__
restore_signals, start_new_session)
File "/usr/lib/python3.5/subprocess.py", line 1282, in _execute_child
raise child_exception_type(errno_num, err_msg)
OSError: [Errno 8] Exec format error
`

Commands:

cd Projects
python3 -m venv /home/pi/Projects/venv37
source venv37/bin/activate
git clone https://github.com/timgrossmann/InstaPy.git
cd InstaPy
python3 -m pip install --user .

Result:

$ python3 -m pip install --user .
Processing /home/pi/Projects/InstaPy
  Requirement already satisfied (use --upgrade to upgrade): instagram-py==0.0.1 from file:///home/pi/Projects/InstaPy in /home/pi/Projects/InstaPy
Collecting GitPython>=2.1.11 (from instagram-py==0.0.1)
  Using cached https://files.pythonhosted.org/packages/fe/e5/fafe827507644c32d6dc553a1c435cdf882e0c28918a5bab29f7fbebfb70/GitPython-2.1.11-py2.py3-none-any.whl
Collecting Pillow>=2.9.0 (from instagram-py==0.0.1)
  Downloading https://www.piwheels.org/simple/pillow/Pillow-5.4.1-cp35-cp35m-linux_armv7l.whl (1.1MB)
    100% |鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅| 1.1MB 55kB/s 
Collecting clarifai>=2.2.3 (from instagram-py==0.0.1)
  Cache entry deserialization failed, entry ignored
  Downloading https://www.piwheels.org/simple/clarifai/clarifai-2.5.2-py3-none-any.whl (165kB)
    100% |鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅| 174kB 67kB/s 
Collecting emoji>=0.5.0 (from instagram-py==0.0.1)
  Using cached https://files.pythonhosted.org/packages/9c/fb/7586e11ff9205c9be9d11d376fcb6990ec4bdfae0a35663fb1ada7e3c10f/emoji-0.5.1-py3-none-any.whl
Collecting plyer>=1.3.0 (from instagram-py==0.0.1)
  Cache entry deserialization failed, entry ignored
  Cache entry deserialization failed, entry ignored
  Using cached https://files.pythonhosted.org/packages/64/02/fa5c7054a879cfda9c937fedf8abfda6706c088da2f97c16655cf3c88626/plyer-1.4.0-py3-none-any.whl
Collecting pyvirtualdisplay>=0.2.1 (from instagram-py==0.0.1)
  Cache entry deserialization failed, entry ignored
  Cache entry deserialization failed, entry ignored
  Cache entry deserialization failed, entry ignored
  Downloading https://www.piwheels.org/simple/pyvirtualdisplay/PyVirtualDisplay-0.2.1-py3-none-any.whl
Collecting requests>=2.19.1 (from instagram-py==0.0.1)
  Using cached https://files.pythonhosted.org/packages/7d/e3/20f3d364d6c8e5d2353c72a67778eb189176f08e873c9900e10c0287b84b/requests-2.21.0-py2.py3-none-any.whl
Collecting selenium>=3.14.0 (from instagram-py==0.0.1)
  Cache entry deserialization failed, entry ignored
  Cache entry deserialization failed, entry ignored
  Using cached https://files.pythonhosted.org/packages/80/d6/4294f0b4bce4de0abf13e17190289f9d0613b0a44e5dd6a7f5ca98459853/selenium-3.141.0-py2.py3-none-any.whl
Will not install to the user site because it will lack sys.path precedence to setuptools in /home/pi/Projects/venv37/lib/python3.5/site-packages

The last line "Will not install to..." is red.

@escariao try

pip install instapy -U

(That updates the pip package)
Or, if you installed via git:

git pull

@TarekJ03 tks! but now...

Traceback (most recent call last):
  File "my_bot.py", line 61, in <module>
    session.follow_user_followers(['user1','user4','user2'], amount=120, randomize=False, interact=True, sleep_delay=600)
  File "/home/pi/Projects/InstaPy/instapy/instapy.py", line 2565, in follow_user_followers
    self.logfolder)
  File "/home/pi/Projects/InstaPy/instapy/unfollow_util.py", line 885, in get_given_user_followers
    channel, jumps, logger, logfolder)
  File "/home/pi/Projects/InstaPy/instapy/unfollow_util.py", line 652, in get_users_through_dialog
    dialog = browser.find_element_by_xpath(dialog_address)
  File "/home/pi/Projects/venv37/lib/python3.5/site-packages/selenium/webdriver/remote/webdriver.py", line 394, in find_element_by_xpath
    return self.find_element(by=By.XPATH, value=xpath)
  File "/home/pi/Projects/venv37/lib/python3.5/site-packages/selenium/webdriver/remote/webdriver.py", line 978, in find_element
    'value': value})['value']
  File "/home/pi/Projects/venv37/lib/python3.5/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
    self.error_handler.check_response(response)
  File "/home/pi/Projects/venv37/lib/python3.5/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//div[text()='Followers' or text()='Following']/../../following-sibling::div"}
  (Session info: headless chrome=65.0.3325.181)
  (Driver info: chromedriver=2.36 (82816abaad3930c3702cf23489f0506ba13b1529),platform=Linux 4.14.79-v7+ armv7l)

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

Was this page helpful?
0 / 5 - 0 ratings