Instapy: browser.find_element_by_xpath

Created on 5 Oct 2017  路  6Comments  路  Source: timgrossmann/InstaPy

Hello Everyone,

The

This error started on the 4th of September. I believe Instagram updated the adroid app also on that date.
The screen to unfollow comes up, then it spits out the text below after about 5-10 sec and then quits.
This is the unfollow text in quickstart.py: session.unfollow_users(amount=1500, onlyInstapyFollowed = False)

Logged in successfully!
Number of people followed automatically remaining: 11070
Traceback (most recent call last):
File "quickstart.py", line 19, in
session.unfollow_users(amount=1500, onlyInstapyFollowed = False)
File "C:\Users\jeffreyInstaPy_03okt\instapy\instapy.py", line 961, in unfollow_users
onlyInstapyMethod, self.automatedFollowedPool)
File "C:\Users\jeffreyInstaPy_03okt\instapy\unfollow_util.py", line 111, in unfollow
dialog = browser.find_element_by_xpath('/html/body/div[4]/div/div[2]/div/div[2]/div/div[2]')
File "C:\Users\jeffrey\AppData\Local\Programs\Python\Python36-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 354, in find_element_by_xpath
return self.find_element(by=By.XPATH, value=xpath)
File "C:\Users\jeffrey\AppData\Local\Programs\Python\Python36-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 832, in find_element
'value': value})['value']
File "C:\Users\jeffrey\AppData\Local\Programs\Python\Python36-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 297, in execute
self.error_handler.check_response(response)
File "C:\Users\jeffrey\AppData\Local\Programs\Python\Python36-32\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 194, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"/html/body/div[4]/div/div[2]/div/div[2]/div/div[2]"}
(Session info: chrome=61.0.3163.100)
(Driver info: chromedriver=2.31.488763 (092de99f48a300323ecf8c2a4e2e7cab51de5ba8),platform=Windows NT 10.0.15063 x86_64)

bug help wanted

Most helpful comment

Can verify this has been fixed in latest version.

All 6 comments

I can confirm I am experiencing the same thing starting on Sept 4th as well. This issue seems to break the unfollow functionality -- so I have had to manually disable the follow and unfollow functions temporarily.

Fix Unfollow (Working October 8th) @converge @randysinnott @jeffreylm
Change line ~110 in "instapy > unfollow_util.py" to:

# find dialog box dialog = browser.find_element_by_xpath('/html/body/div[4]/div/div/div[2]/div/div[2]')

Don't do git so someone else update this

just made a pull request

This problem should be fix with the latest version, if you still face this issue, pls reopen it.

Can verify this has been fixed in latest version.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

seuraltimez picture seuraltimez  路  3Comments

ingorichter picture ingorichter  路  3Comments

CharlesCCC picture CharlesCCC  路  3Comments

Naramsim picture Naramsim  路  3Comments

wyvers picture wyvers  路  3Comments