ChatExchange
ChatExchange copied to clipboard
Intermittent login failure
Traceback (most recent call last):
File "report.py", line 18, in <module>
wrap.login(username,password)
File "SEChatWrapper.py", line 49, in login
self.br.loginChatSE()
File "SEChatBrowser.py", line 67, in loginChatSE
authToken = chatlogin.find('input', {"name": "authToken"})['value']
TypeError: 'NoneType' object has no attribute '__getitem__'
Probably due to throttling
It seems a little more than intermittent to me.
It seems to get better and worse over time. I've gone more than a day without hitting it, then hit it almost constantly for a while, then had it go away again.
We can handle the error more gracefully (a LoginError rather than a TypeError), but the real solution is going to be when we generalize our retrying logic, so it can automatically back off and try again.
I have never gotten this to work because of this error.
@red-green maybe it's a different issue? Are you providing the correct login, and how?
Also, if your IP is not stable, this can easily happen, since SE's login requires a stable IP for a small amount of time.
@Manishearth I'm not sure. Do i use my Email, or my username, or my display name?
@red-green You use your StackExchange openid credentials. (email+password). Try it out here
GMail login is not yet implemented. You can create a StackExchange openid and attach it to your account by the "my logins" link on your profile.
@Manishearth I can confirm that I am logging in by looking at the SE OpenID website. The app crashes after a successful login.
Crashes with what message?
-Manish Goregaokar
On Sat, May 10, 2014 at 7:24 PM, red-green [email protected] wrote:
@Manishearth https://github.com/Manishearth I can confirm that I am logging in by looking at the SE OpenID website. The app crashes after a successful login.
— Reply to this email directly or view it on GitHubhttps://github.com/Manishearth/ChatExchange/issues/8#issuecomment-42742332 .
@Manishearth It crashes before it sends a message. Here is the full output of the chat.py
example:
INFO:chatexchange.wrapper.SEChatWraper:Logging in.
INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): openid.stackexchange.com
INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): stackexchange.com
Traceback (most recent call last):
File "main.py", line 77, in <module>
main(*sys.argv[1:])
File "main.py", line 29, in main
wrapper.login(username,password)
File "/home/ubuntu/tardisbot/ChatExchange/chatexchange/wrapper.py", line 88, in login
self.br.loginChatSE()
File "/home/ubuntu/tardisbot/ChatExchange/chatexchange/browser.py", line 125, in loginChatSE
authToken = chatlogin.find('input', {"name": "authToken"})['value']
TypeError: 'NoneType' object has no attribute '__getitem__'
So this has to do with SE's login mechanism. Go to Stackexchange.com, and instead of using the SE login, enter https://openid.stackexchange.com in the "custom openid" box. You will have to authorize it to use the openid.
This API isn't yet ready for public consumption, these kinks are still present. We'll sort these out as time passes.
I receive this error as well (with adjusted line numbers, presumably because of 9 months of development from when this issue was originally open). Prior to today, I was able to log in and have been utilizing this project for about 6 months with no login issues.
File "H:\Dev\Git\SE_Chatbot\ChatExchange\chatexchange\client.py", line 140, in login
self._br.login_se_chat()
File "H:\Dev\Git\SE_Chatbot\ChatExchange\chatexchange\browser.py", line 202, in login_se_chat
auth_token = start_login_soup.find('input', {'name': 'authToken'})['value']
TypeError: 'NoneType' object has no attribute '__getitem__'
Kinda invalided by now as OpenID is now replaced. But on the new login, you may run into a captcha after too many recent logins which blocks you for 5 - 10 minutes.