Instapy: 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']"}

Created on 28 Jan 2018  路  6Comments  路  Source: timgrossmann/InstaPy

Stack trace:

Traceback (most recent call last):
File ".q2.py", line 12, in
session.login()
File "C:pyInstaPyinstapyinstapy.py", line 253, in login
self.bypass_suspicious_attempt):
File "C:pyInstaPyinstapylogin_util.py", line 115, in login_user
"//footer[@class='_s5vm9']/div[@class='_g7lf5 _9z659']/nav["
File "C:UsersandreiAppDataLocalProgramsPythonPython36-32libsite-packagesseleniumwebdriverremotewebdriver.
py", line 293, in find_element_by_xpath
return self.find_element(by=By.XPATH, value=xpath)
File "C:UsersandreiAppDataLocalProgramsPythonPython36-32libsite-packagesseleniumwebdriverremotewebdriver.
py", line 752, in find_element
'value': value})['value']
File "C:UsersandreiAppDataLocalProgramsPythonPython36-32libsite-packagesseleniumwebdriverremotewebdriver.
py", line 236, in execute
self.error_handler.check_response(response)
File "C:UsersandreiAppDataLocalProgramsPythonPython36-32libsite-packagesseleniumwebdriverremoteerrorhandl
er.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.35.528161 (5b82f2d2aae0ca24b877009200ced9065a772e73),platform=Windows NT 10.0.16299 x86_6
4)

Most helpful comment

Set self.switch_language to False in instapy.py

All 6 comments

Set self.switch_language to False in instapy.py

Thanks

After setting self.switch_language to False in instapy.py

I couldn't logging at all although the same login info is valid when logging in manually

2018-01-29 02:46:34 - INFO - Session started - 2018-01-29 02:46:34
Cookie file not found, creating cookie...
2018-01-29 02:46:48 - CRITICAL - Wrong login data!
2018-01-29 02:49:03 - WARNING - There are 0 people to follow
2018-01-29 02:49:28 - ERROR - following_link error list index out of range
2018-01-29 02:49:28 - INFO - Session ended - 2018-01-29 02:49:28
2018-01-29 02:49:28 - INFO - --------------------

Switching self.switch_language to False solved it for me. Try deleting the cookie and try again, double checking the login info.

@estebancortero clearing cookies and cache seem to have solved the problem, thank you

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Spyd3r0us picture Spyd3r0us  路  3Comments

Naramsim picture Naramsim  路  3Comments

rahulkapoor90 picture rahulkapoor90  路  3Comments

ediooo picture ediooo  路  3Comments

harrypython picture harrypython  路  3Comments