@converge hi there, I get this error after new commit.
Traceback (most recent call last):
File "InstaPy/5b97e8915f0d2d0014004ccf.py", line 18, in
session.login()
File "/root/InstaPy/instapy/instapy.py", line 415, in login
self.bypass_with_mobile):
File "/root/InstaPy/instapy/login_util.py", line 182, in login_user
"//select[@class='hztqj']/option[text()='English']")
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/webdriver.py", line 394, in find_element_by_xpath
return self.find_element(by=By.XPATH, value=xpath)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/webdriver.py", line 978, in find_element
'value': value})['value']
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//select[@class='hztqj']/option[text()='English']"}
(Session info: headless chrome=70.0.3538.77)
(Driver info: chromedriver=2.42.591071 (0b695ff80972cc1a65a5cd643186d2ae582cd4ac),platform=Linux 4.4.0-138-generic x86_64)
@imkimchi
File "/root/InstaPy/instapy/login_util.py", line 182, in login_user
"//select[@Class='hztqj']/option[text()='English']")
by looking at the log, it seems like an old issue that has been resolved long time ago.
if you sure have get latest version. you can try comment out that line (assume you default language is using english).
@CharlesCCC if you look at the latest commit you can see that that is added by @converge
@fgisslen yes, I seem that. If you default language is English, you don't need switch language, you can delete that piece of code.
@CharlesCCC some of my accounts hasn't english as default.
@converge @CharlesCCC @sionking @uluQulu @timgrossmann this error doesn't stop showing.
@fgisslen I can't reproduce your issue on my side, and it sounds like not every account you have is having this issue ?
Just out of curiosity, Are you using cooking file for your login ? because, you usually don't need login every time. Unless, you got new account set-up all the time ?
@CharlesCCC @converge I still get this error with accounts not using english as default.
@fgisslen I was able to re-produce your issue today. what I'm seeming is, when instapy trying to login with instagram. it getting the 5xx server error page or saying the page not found. I'm wondering this is some kind of detection from instagram.com that preventing user from using bot. You have to see this by disable headless mode. btw, this is not happening all the time on mine account.
@CharlesCCC no, it's not happening to all of mine accounts either. Thinking if it has something to do with user agent or so? maybe if I set user agent to chrome instead of the wierd one that is showing in headless mode?
hey @CharlesCCC , sounds like you tried to connect when IG was offline. https://downdetector.com/status/instagram
Happened to me few hours back. I guess there were some minor issues with Instagram in the last 24h according to the above website.
@converge Yea, I originally thought that too, but it wasn't the case, while it getting the error, I was able to manually going to instagram.com and login without issue. I highly suspect it is some sort of bot-detection mechanism. @sionking have you seeming anything similar to this ?
@CharlesCCC @timgrossmann @sionking Actually I am getting this a lot right now. On some of my accounts. I am managing around 300 accounts at the moment. But I have detected that it happens kind of randomly. It has nothing to do with that instagram is down.
@fgisslen I agree with you, just out of curiosity, how do you manage "manage 300+ accounts" all at once, I'm thinking it might have something to do with that, consider instagram.com block IP from multiple logins. (talk about which, while I was getting the 5XX error code, I was using a network that shared the same public IP address, which potentially means, there might be lots of other user is also using Instagram with the same IP as mine)
@CharlesCCC I use proxy servers. Every account has different ip
Inactive issue, reopen if you need assistance.