Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

500 Error when reading messages #149

Open
muddyfish opened this issue Oct 19, 2017 · 1 comment
Open

500 Error when reading messages #149

muddyfish opened this issue Oct 19, 2017 · 1 comment

Comments

@muddyfish
Copy link

When receiving messages from SE, it raised a 500 error. After this, it no longer read any more messages. This is probably due to the exception killing off the reader

Exception in thread Thread-2:
Traceback (most recent call last):
  File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "/home/user/chatexchange_forward/venv/lib/python3.6/site-packages/chatexchange/browser.py", line 742, in _runner
    'events', {'r' + self.room_id: last_event_time}).json()
  File "/home/simon/chatexchange_forward/venv/lib/python3.6/site-packages/chatexchange/browser.py", line 133, in post_fkeyed
    return self.post(url, data, headers)
  File "/home/user/chatexchange_forward/venv/lib/python3.6/site-packages/chatexchange/browser.py", line 113, in post
    return self._request('post', url, data, headers, with_chat_root)
  File "/home/user/chatexchange_forward/venv/lib/python3.6/site-packages/chatexchange/browser.py", line 102, in _request
    response.raise_for_status()
  File "/home/user/chatexchange_forward/venv/lib/python3.6/site-packages/requests/models.py", line 935, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: https://chat.stackexchange.com/error?aspxerrorpath=/events
@Filnor
Copy link

Filnor commented Nov 23, 2018

Can your reproduce the error now? Chat often has some outtakes and especially this lib has it's issues with it. I'd suggest to wrap the watch() or the watch_socket() function in a try ... except and catch any exceptions you may receive. That should also eliminate crashes when the socket connection dies.

Also, 500 Error codes mostly suggest it's an issue on SE's side (since HTTP errors in the 500 range are server errors)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants