7

I'm working on my chatbot for Stack Exchange (mainly for Stack Overflow in Russian) and everything worked fine until today. I rebooted it and when it tried to login to MSE again it raised this error:

Traceback (most recent call last):
  File "main.py", line 475, in <module>
    se_chat.login(email, password)
  File "/home/vos-mottor/PycharmProjects/VosMottorBot/venv/lib/python3.8/site-packages/chatexchange/client.py", line 138, in login
    self._br.login_site(self.host, email, password)
  File "/home/vos-mottor/PycharmProjects/VosMottorBot/venv/lib/python3.8/site-packages/chatexchange/browser.py", line 148, in login_site
    self._se_openid_login_with_fkey(
  File "/home/vos-mottor/PycharmProjects/VosMottorBot/venv/lib/python3.8/site-packages/chatexchange/browser.py", line 179, in _se_openid_login_with_fkey
    response = self.post(post_url, data, with_chat_root=False)
  File "/home/vos-mottor/PycharmProjects/VosMottorBot/venv/lib/python3.8/site-packages/chatexchange/browser.py", line 113, in post
    return self._request('post', url, data, headers, with_chat_root)
  File "/home/vos-mottor/PycharmProjects/VosMottorBot/venv/lib/python3.8/site-packages/chatexchange/browser.py", line 102, in _request
    response.raise_for_status()
  File "/home/vos-mottor/PycharmProjects/VosMottorBot/venv/lib/python3.8/site-packages/requests/models.py", line 941, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: https://meta.stackexchange.com/users/login

I'm using the chatexchange library.

How can I fix it and why does it occur?

11
  • 2
    Can you login with the bot account manually? Can you please link to the bot profile? Nov 3, 2020 at 16:59
  • @Shadow10YearsWizard yeah, I can. If you think it is all because of recaptcha, you're wrong because it raises another error. Nov 3, 2020 at 17:00
  • Actually didn't have recaptcha in mind, just wanted a direction to begin with. Nov 3, 2020 at 17:01
  • @Shadow10YearsWizard I also tried with another account but it returns the same ( Nov 3, 2020 at 17:04
  • What are the fields that are being posted? Are you also posting ssrc and two oauth_ fileds? Is the fkey value fresh?
    – rene
    Nov 3, 2020 at 17:12
  • @rene Chatexchange uses login (email) and password to login. Nov 3, 2020 at 17:13
  • I found this one but I frankly can't understand may it be related to this issue and what should I do. Nov 3, 2020 at 17:17
  • 1
    @VictorVosMottor there were changes to the login system, make sure to take the latest version of the chatbot core. For how long did the bot run before you rebooted it? Nov 3, 2020 at 17:17
  • @Shadow10YearsWizard For how long did the bot run before you rebooted it? I frequently reboot it (sometimes it works up to 30 mins, sometimes I reboot every 3 minutes ;)). Nov 3, 2020 at 17:19
  • 7
    Are you still seeing this? A bug went out in a canary deploy (to a single server), that blew up when the Accept-Language header was not present (which is usually there for everybody viewing the page in a browser, but not for bots), and should be fixed now.
    – m0sa StaffMod
    Nov 3, 2020 at 17:21
  • @m0sa Yeah, hooooooooooooray, now it works!!! ;) Nov 3, 2020 at 17:50

1 Answer 1

7

A bug went out in a canary deploy (to a single server), that blew up when the Accept-Language header was not present (which is usually there for everybody viewing the page in a browser, but not for bots), and should be fixed now.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .