Returns 500 - need help diagnosing
tim-massey opened this issue · 5 comments
tim-massey commented
I keep getting the following error
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<title>500 Internal Server Error</title>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.</p>
Any clues on how to diagnose this error? This is on heroku and locally.
frodopwns commented
I too am getting a 500 for the !standup command. !help and !start seem to return a 200.
frodopwns commented
54.174.219.199 - - [24/Apr/2015 18:09:12] "POST / HTTP/1.1" 500 -
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1836, in __call__
return self.wsgi_app(environ, start_response)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1820, in wsgi_app
response = self.make_response(self.handle_exception(e))
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1403, in handle_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1817, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1477, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1381, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1475, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1461, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/home/ardaagnt/code/morgenbot/morgenbot.py", line 266, in main
init()
File "/home/ardaagnt/code/morgenbot/morgenbot.py", line 49, in init
users = standup_users()
File "/home/ardaagnt/code/morgenbot/morgenbot.py", line 96, in standup_users
ignore_users_array = eval(ignore_users)
File "<string>", line 0
^
SyntaxError: unexpected EOF while parsing
edited to paste correct error stacktrace
frodopwns commented
If you don't set ignore_users things go awry:
IGNORE_USERS: a string representing a comma-separated array of strings representing active channel users who never stand up. (eg '["username1", "username2"]'; optional; defaults to '')
ignore_users = os.environ['IGNORE_USERS'] if 'IGNORE_USERS' in os.environ.keys() else ''
ignore_users_array = eval(ignore_users)
eval('') causes
File "<string>", line 0
^
SyntaxError: unexpected EOF while parsing
frodopwns commented
@tim-massey try this change frodopwns@d4b6480
eelzon commented
Thank you for reporting this bug @tim-massey, and thanks for the pull request, @frodopwns!