Instapy: Not logging in anymore

Created on 25 Jan 2018  路  11Comments  路  Source: timgrossmann/InstaPy

Expected Behavior

To log in

Current Behavior

cannot click the log in button:

    session.login()
  File "/Users/luigicali/Downloads/InstaPy-7a6c9ff98e2db42881d1acff08342b6752796bed copy/instapy/instapy.py", line 213, in login
    self.switch_language):
  File "/Users/luigicali/Downloads/InstaPy-7a6c9ff98e2db42881d1acff08342b6752796bed copy/instapy/login_util.py", line 18, in login_user
    "//footer[@class='_s5vm9']/div[@class='_g7lf5 _9z659']/nav["
  File "/Library/Python/2.7/site-packages/selenium-2.53.6-py2.7.egg/selenium/webdriver/remote/webdriver.py", line 293, in find_element_by_xpath
    return self.find_element(by=By.XPATH, value=xpath)
  File "/Library/Python/2.7/site-packages/selenium-2.53.6-py2.7.egg/selenium/webdriver/remote/webdriver.py", line 752, in find_element
    'value': value})['value']
  File "/Library/Python/2.7/site-packages/selenium-2.53.6-py2.7.egg/selenium/webdriver/remote/webdriver.py", line 236, in execute
    self.error_handler.check_response(response)
  File "/Library/Python/2.7/site-packages/selenium-2.53.6-py2.7.egg/selenium/webdriver/remote/errorhandler.py", line 192, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//footer[@class='_s5vm9']/div[@class='_g7lf5 _9z659']/nav[@class='_luodr']/ul[@class='_g8wl6']/li[@class='_538w0'][10]/span[@class='_pqycz _hqmnd']/select[@class='_fsoey']/option[text()='English']"}
  (Session info: chrome=63.0.3239.132)
  (Driver info: chromedriver=2.34.522932 (4140ab217e1ca1bec0c4b4d1b148f3361eb3a03e),platform=Mac OS X 10.13.2 x86_64)

Possible Solution (optional)

InstaPy configuration

Most helpful comment

You can just set the Switch language to False.
In instapy.py

make

self.switch_language = False

All 11 comments

I am also getting this error. Vote up!

Which script in the instapy folder contains this function? And also which method in that script?

Possible solution
just comment on lines: login_until.py

if switch_language:
browser.find_element_by_xpath(
"//footer[@class='_s5vm9']/div[@class='_g7lf5 _9z659']/nav["
"@class='_luodr']/ul[@class='_g8wl6']/li[@class='_538w0'][10]/"
"span[@class='_pqycz _hqmnd']/select[@class='_fsoey']/option"
"[text()='English']").click()

it will work

Yes commenting on those lines worked for me, thanks @mindakronik

You're welcome @biggt22

created: Pull request to fix the issue based of the suggestion from @mindakronik

You can just set the Switch language to False.
In instapy.py

make

self.switch_language = False

@ganeshkrishnan1 , this worked for me :
self.switch_language = False

Thanks !

this worked!

You can just set the Switch language to False.
In instapy.py
make
self.switch_language = False

after
self.switch_language = False
i started getting a wrong login detail error
when it actually correct

i did to, turned out all you have to add is sleep(1) before the input_username part in login_util.py.

# Enter username and password and logs the user in # Sometimes the element name isn't 'Username' and 'Password' # (valid for placeholder too) sleep(1) input_username = browser.find_elements_by_xpath( "//input[@name='username']")

Was this page helpful?
0 / 5 - 0 ratings

Related issues

drcyber975 picture drcyber975  路  3Comments

tibor picture tibor  路  3Comments

Spyd3r0us picture Spyd3r0us  路  3Comments

rahulkapoor90 picture rahulkapoor90  路  3Comments

ingorichter picture ingorichter  路  3Comments