Instapy: IndexError: list index out of range

Created on 14 Jun 2017  路  6Comments  路  Source: timgrossmann/InstaPy

Hey guys, I've been using the bot for a while, but lately it keeps giving this error: IndexError: list index out of range. It usually happens after 5 accounts liked, or less. Do you have any idea of how I can fix this? Thank you!

bug help wanted

Most helpful comment

@awb715 I changed login_util.py line 23 from:

inputs = browser.find_elements_by_xpath("//form/div/input")

to

inputs = browser.find_elements_by_xpath("//form/div/div/input")

and it works. did instagram change the location of the form?

All 6 comments

same problem
browser.execute_script("arguments[0].value = '" + rand_comment + " ';", comment_input[0]);
IndexError: list index out of range
but just for some tags

Absolute beginner here: I think I got the same problem, but it occurs only when it tries to comment a picture

170615_bug
^
I am thankful for any help

Same here. Happens only when I unfollow users.
I have 7 500 followed users (max limit set by Instagram I guess) but it also happened a while ago when I had back to 3k users followed

Traceback (most recent call last):
File "index.py", line 4, in
session.login()
File "/var/www/instapy/instapy/instapy.py", line 124, in login
if not login_user(self.browser, self.username, self.password):
File "/var/www/instapy/instapy/login_util.py", line 24, in login_user
action = ActionChains(browser).move_to_element(inputs[0]).click().send_keys(username) \
IndexError: list index out of range

This just started happening for me also!

@awb715 I changed login_util.py line 23 from:

inputs = browser.find_elements_by_xpath("//form/div/input")

to

inputs = browser.find_elements_by_xpath("//form/div/div/input")

and it works. did instagram change the location of the form?

@westondeboer yes, i see that an additional div has been added in the input field wrapper in the login form.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rahulkapoor90 picture rahulkapoor90  路  3Comments

Naramsim picture Naramsim  路  3Comments

n0sw34r picture n0sw34r  路  3Comments

neomh picture neomh  路  3Comments

seuraltimez picture seuraltimez  路  3Comments