Instapy: Failed to load desired amount of users (weird bug)?

Created on 18 Oct 2018  路  19Comments  路  Source: timgrossmann/InstaPy

Once I run the bot it straight away gave an error failed to load desired amount of users and it will show the suggested user lists from the people who follow you or some other random users. After a while it will try to simulate follow or like the people pictures from the list of suggested followers like roughly 16 but I'm targeting more followers from the specific users.

The problem is it's not loading the user's followers but getting it from the suggested list. Is this a bug from instagram or something?

Yesterday it work perfectly. But today there seems to be some problem I already downloaded the latest instapy and its still the same.

Please help me thanks.

Most helpful comment

3159

All 19 comments

same problem;
@uluQulu or @sionking can you help us please?

Same thing started today. Seems like scrolling the follower popup doesn't work so the whole list of users is not loaded.

same problem for me as well @uluQulu

I made a dirty fix by first scrolling to 47% of the modal's scrollHeight, which makes the follower list start loading and the suggestions disappear, and then continue scrolling to the bottom as it currently does.

I use the most updated version of instapy but I got this error when I use "follow_user_followers" session.
Is there any recommendation?

thanks in advance

bir el at谋ver hocam @uluQulu

@anna-osipova can you share please the temporary fix? thanks a bunch

I added a scroll_to function

def scroll_to(browser, element, percentage):
    browser.execute_script(
            "arguments[0].scrollTop = arguments[0].scrollHeight * percentage", element, percentage)
    sleep(1)
    return

and called it in instapy/unfollow_util.py on line 657

scroll_to(browser, dialog, 0.47)
    while (total_list < amount) and not abort:
        before_scroll = total_list
        for i in range(4):
            scroll_bottom(browser, dialog, 2)
            sc_rolled += 1
            simulator_counter += 1
...

This could be implemented prettier by finding the bottom of the "following" list and scrolling to it, but I'm short on time today

@anna-osipova thanks for the support, we hope that someone will fix this issue also in the main version of InstaPy because i think that this issue happen to every user

File "C:\Users\Desktop\instapy\InstaPy-master\instapy\instapy.py", line 2177, in interact_user_followers
self.logfolder)
File "C:\Users\Desktop\instapy\InstaPy-master\instapy\unfollow_util.py", line 905, in get_given_user_followers
channel, jumps, logger, logfolder)
File "C:\Users\Desktop\instapy\InstaPy-master\instapy\unfollow_util.py", line 656, in get_users_through_dialog
scroll_to(browser, dialog, 0.47)
NameError: name 'scroll_to' is not defined

after implementing the dirty fix got these errors. @anna-osipova

@cormo1990 the dirty fix fixed it for you? It cant seem to work on mine though..

@nosecretz

NameError: name 'scroll_to' is not defined

Well, it looks like you didn't add the scroll_to function or didn't put it in the correct place or with correct indentation.

3159

@nosecretz follow the solution of @anna-osipova, it works!

@cormo1990 @anna-osipova #3159 solution causes script to crash with
"Unknown error: Cannot read property 'scrollIntoView' of undefined"

@anna-osipova Thanks it is working. I hope it stays like this..
@Tachenz It's working for me though
@cormo1990 Yes it's working. Great solution

hey @anna-osipova i have tried the adding lines from the #3159 and also https://github.com/timgrossmann/InstaPy/issues/3155#issuecomment-430982408 it is still not working for mine. do you have any other solutions?

@dokuroskull Pull request (#3159) should work, at least it does for me. Ignore the earlier fixes

@anna-osipova so you don't encounter "Unknown error: Cannot read property 'scrollIntoView' of undefined" with the PR from #3159? Mine crashes with this error the moment I apply the fix..

3159

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  路  3Comments

seuraltimez picture seuraltimez  路  3Comments

converge picture converge  路  3Comments

drcyber975 picture drcyber975  路  3Comments

CodeMaster1 picture CodeMaster1  路  3Comments