Instapy: List Index Out of Range Error when trying to Unfollow

Created on 13 Nov 2017  路  13Comments  路  Source: timgrossmann/InstaPy

Current Behavior

Unfollow_util was always failing when it was trying to access the 'Following' button on our Instagram profile page and was throwing the error "following_link error, list index out of range"

Possible Solution (optional)

Changing line 131 of Unfollow_util.py to the following got it working for me:
'//article//ul//li[3]')

Most helpful comment

Thanks it works for me 馃憤

All 13 comments

thanks @arjunmurali1993 , can anyone else test it ? It's good have more people testing it, because sometimes the layout change isn't global(countries/regions).

it works already for me

I'm getting the "list index out of range" on unfollow, but not sure if its related to this thread as I'm using InstaPy in a server with the nogui option.
I'm having this problem for a few days already.

I just get:

Logged in successfully!
set_automated_followed_pool error
list index out of range
--> Total people unfollowed : 0

Session ended

My user__followedPool.csv file has 1259 lines. If I cut this file in half (~632 lines) it just works.

@rediv can you help us testing #915 ?

@converge I tested and had no change here.
With a 600 lines csv file: unfollow works sucessfully with or without #915
With a 1200 lines csv file: unfollow does not work with or without #915

My instagram account is set to english.

@rediv with 1200 lines in csv do you get this exactly error ?

Logged in successfully!
set_automated_followed_pool error
list index out of range
--> Total people unfollowed : 0

Session ended

or is there something different ?

@converge I get that exactly same error.

@rediv can you send me your csv file ? So I can reproduce the error here and debug ? If yes, joaopaulo.[email protected]

@converge I was just about to send the file to you when I decided to double check it.
It turns out that the problem was caused by a blank line in the csv file! I simply removed it and everything works fine now.
And I can confirm that is working with or without #915

I have the exact same error as @arjunmurali1993:

Logged in successfully!
Number of people followed automatically remaining: 9182
('following_link error \n', 'list index out of range')

It's fixed for me with #915

works for me. thanks!

thanks @flo1t @arisanguinetti @rediv @paranoiasystem and specially @arjunmurali1993 for the bug fix. (team work :octocat:)

Thanks it works for me 馃憤

Was this page helpful?
0 / 5 - 0 ratings