Instapy: Login Issue

Created on 8 Aug 2017  路  13Comments  路  Source: timgrossmann/InstaPy

Anyone else having this problem?

Traceback (most recent call last):
  File "insta_script.py", line 495, in <module>
    session.login()
  File "/home/pi/Projects/InstaPy/instapy/instapy.py", line 146, in login
    if not login_user(self.browser, self.username, self.password, self.switch_language):
  File "/home/pi/Projects/InstaPy/instapy/login_util.py", line 13, in login_user
    browser.find_element_by_xpath("//footer[@class='_oofbn']/div[@class='_mhrsk _pcuq6']/nav["
  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":"//footer[@class='_oofbn']/div[@class='_mhrsk _pcuq6']/nav[@class='_p1gbi']/ul[@class='_fh0f2']/li[@class='_fw3ds'][10]/span[@class='_17z9g _c4mil']/select[@class='_nif11']/option[text()='English']"}
Stacktrace:
    at FirefoxDriver.prototype.findElementInternal_ (file:///tmp/tmpKCdbVi/extensions/[email protected]/components/driver-component.js:10770)
    at fxdriver.Timer.prototype.setTimeout/<.notify (file:///tmp/tmpKCdbVi/extensions/[email protected]/components/driver-component.js:625)
bug enhancement help wanted

Most helpful comment

It's an issue with the auto-English language selector thing on launch (I'm guessing the name of the element changed or something). If you only use the bot in English (your default browser locale being English), you can comment out lines 12-16 in instapy/login_util.py to get it working temporarily until someone corrects the issue.

All 13 comments

I just got the same error too! It started about half and hour ago.

I'm seeing the same thing too:

raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: 
{"method":"xpath","selector":"//footer[@class='_oofbn']/div[@class='_mhrsk _pcuq6']/nav[@class='_p1gbi']/ul[@class='_fh0f2']/li[@class='_fw3ds'][10]/span[@class='_17z9g _c4mil']/select[@class='_nif11']/option[text()='English']"}

Final dead page for posterity:

same here, happened couple days ago

got the same issue here

Same thing here. Looks like the default page for instagram is not the login screen but the account set up. This only just happened to me today, but I'm not on my normal laptop. So is there a way to set default instagram.com to the login, or do we need to add a line for finding the log in button before entering the log in information.

It's an issue with the auto-English language selector thing on launch (I'm guessing the name of the element changed or something). If you only use the bot in English (your default browser locale being English), you can comment out lines 12-16 in instapy/login_util.py to get it working temporarily until someone corrects the issue.

I have the same issue
commenting lines 11-14 in instapy/login_util.py fix it
but the pagination does not work for some reason

@leasabban On the latest commit it's actually lines 12-16, sorry about that.

yes this is actually what I did
so the login part works fine now
but for some reason pagination does not work

@leasabban Maybe it's a different issue then? I got the login issue today from the language selector thing, and once I fixed that everything now works again how it should.

@Bay40k yes maybe u right will try again tomorrow on my bigger screen sometimes on my laptop it does not paginate
Thanks anyway!

500 was merged, could you guys please test again?

It works.

Was this page helpful?
0 / 5 - 0 ratings