Receiving an error when attempting to use the interact_user_followers method to only like 3 posts from a specified users followers. Running on Raspberry Pi 3.
dont_include, self.username, self.follow_restrict, random)
File "/home/pi/Projects/InstaPy/instapy/unfollow_util.py", line 286, in get_given_user_followers
dialog = browser.find_element_by_xpath('/html/body/div[4]/div/div[2]/div/div[2]/div/div[2]')
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 293, in find_element_by_xpath
return self.find_element(by=By.XPATH, value=xpath)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 752, in find_element
'value': value})['value']
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 236, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/errorhandler.py", line 192, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element: {"method":"xpath","selector":"/html/body/div[4]/div/div[2]/div/div[2]/div/div[2]"}
Stacktrace:
at FirefoxDriver.prototype.findElementInternal_ (file:///tmp/tmpiWGE8x/extensions/[email protected]/components/driver-component.js:10770)
at fxdriver.Timer.prototype.setTimeout/<.notify (file:///tmp/tmpiWGE8x/extensions/[email protected]/components/driver-component.js:625)
my quickstart.py file below
from instapy import InstaPy
insta_username = 'username'
insta_password = 'password'
# if you want to run this script on a server,
# simply add nogui=True to the InstaPy() constructor
InstaPy(username=insta_username, password=insta_password, use_firefox=True, page_delay=25)\
.login()\
.set_upper_follower_count(limit=3000)\
.set_dont_include(['jonnykmedia', 'yogabuttar', 'mtnlovejh'])\
.set_dont_like(['sex', 'nsfw'])\
.set_user_interact(amount=3, random=False, percentage=100)\
.set_do_follow(enabled=False, percentage=70)\
.set_do_like(enabled=True, percentage=100)\
.set_comments(["Cool", "Super!"])\
.set_do_comment(enabled=False, percentage=33)\
.interact_user_followers(['armadaskis'], amount=300, random=False)\
.end()
@BernardoGO Any ideas on this one?
I'm a beginner so I can't really help you with the problem at hand. However, I had the same issue and think it is related to the "random=False" statement in the .interact_*() function. I don't think that's a really satisfying solution, but setting the random=False statements to true, made the script run for me again.
*Edit: Using a too high amount seems to cause problems for me as well, so I keep it at 100
@nnvum I tried both suggestions, but still receive the same error.
@BernardoGO @timgrossmann I'd be willing to post $10 bounty to get this working on RPI3 and #583 changes implemented. Let me know what you think.
@timgrossmann bounty posted. The fix should also resolve the inability to comment on a post. Let me know if additional details are needed.
@timgrossmann @BernardoGO I did a pull this morning for the latest changes and commented line 15 out of the instapy.py file due to some issues with Clarifai, which I do not use. After making this change the Like feature started to work.
Commenting still not functioning, same issue as reported in #494
I think this item can be closed and the bounty moved to #494
@gitpatrickhub I think moving bounties doesn't work.
We'll close this once the problem in #494 has been resolved
@timgrossmann thanks! Hopefully someone can help figure out the issue and claim the bounty.
I am super sick, So I don't know how to do push pull git. But changing the xpath to
dialog = browser.find_element_by_xpath("//*[contains(text(), 'followers')]")
in two sections in unfollow.py it should fix the error.
@westondeboer i have edited the unfollo_util.py like you said, but i still got the following error:
('following_link error n', 'list index out of range')
does anyone have an idea how to fix this?
The bug is fixed. Please reopen it if you still need some help.