Closed KingBoomie closed 3 years ago
visiting the quiz page doesn't show the quiz and there's a 500 error in the console for a POST to https://dcp.stanford.edu/new_expr:
In my effort to fix this I brought the whole site down. Now I need someone at Stanford to look into the situation, hopefully it won't take too long.
Fixed!
visiting the quiz page doesn't show the quiz and there's a 500 error in the console for a POST to https://dcp.stanford.edu/new_expr:
click for the 500 response content
``` OperationalError at /new_expr (1045, "Access denied for user 'root'@'localhost' (using password: NO)") Request Method: POST Request URL: http://localhost:8000/new_expr Django Version: 1.5.1 Python Executable: /home/dcp/dcp_site/env/bin/python2 Python Version: 2.7.12 Python Path: ['/home/dcp/dcp_site', '/home/dcp/dcp_site/env/bin', '/home/dcp/dcp_site/env/lib/python2.7', '/home/dcp/dcp_site/env/lib/python2.7/plat-x86_64-linux-gnu', '/home/dcp/dcp_site/env/lib/python2.7/lib-tk', '/home/dcp/dcp_site/env/lib/python2.7/lib-old', '/home/dcp/dcp_site/env/lib/python2.7/lib-dynload', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/home/dcp/dcp_site/env/local/lib/python2.7/site-packages'] Server time: Fri, 4 Jun 2021 08:29:43 -0700 Installed Applications: ('django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', 'dcp_sandbox', 'south') Installed Middleware: ('django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware') Traceback: File "/home/dcp/dcp_site/env/local/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response 115. response = callback(request, *callback_args, **callback_kwargs) File "/home/dcp/dcp_site/dcp_sandbox/views.py" in new_expr 102. request.POST['dcp'] == true_str) File "/home/dcp/dcp_site/dcp_sandbox/models.py" in get_random_expression 39. prob_increase) File "/home/dcp/dcp_site/dcp_sandbox/models.py" in get_random_expression_tree 58. Q(terminal=terminal) | Q(terminal=True), File "/home/dcp/dcp_site/env/local/lib/python2.7/site-packages/django/db/models/query.py" in __len__ 92. self._result_cache.extend(self._iter) File "/home/dcp/dcp_site/env/local/lib/python2.7/site-packages/django/db/models/query.py" in iterator 301. for row in compiler.results_iter(): File "/home/dcp/dcp_site/env/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py" in results_iter 775. for rows in self.execute_sql(MULTI): File "/home/dcp/dcp_site/env/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py" in execute_sql 839. cursor = self.connection.cursor() File "/home/dcp/dcp_site/env/local/lib/python2.7/site-packages/django/db/backends/__init__.py" in cursor 324. cursor = self.make_debug_cursor(self._cursor()) File "/home/dcp/dcp_site/env/local/lib/python2.7/site-packages/django/db/backends/mysql/base.py" in _cursor 405. self.connection = Database.connect(**kwargs) File "/home/dcp/dcp_site/env/local/lib/python2.7/site-packages/MySQLdb/__init__.py" in Connect 81. return Connection(*args, **kwargs) File "/home/dcp/dcp_site/env/local/lib/python2.7/site-packages/MySQLdb/connections.py" in __init__ 193. super(Connection, self).__init__(*args, **kwargs2) Exception Type: OperationalError at /new_expr Exception Value: (1045, "Access denied for user 'root'@'localhost' (using password: NO)") Request information: GET: No GET data POST: prob_increase = u'20' positive = u'false' concave = u'false' negative = u'false' prob_terminate = u'0.05' convex = u'true' true_str = u'true' dcp = u'true' FILES: No FILES data COOKIES: csrftoken = '7VTVCfcNBH1attIteG31tKMsCPKwQpNh' _ga = 'GA1.2.1059466306.1622820412' _gid = 'GA1.2.1032619607.1622820412' META: HTTP_X_FORWARDED_SERVER = 'dcp.stanford.edu' HTTP_REFERER = 'https://dcp.stanford.edu/quiz' HTTP_X_FORWARDED_HOST = 'dcp.stanford.edu' SERVER_SOFTWARE = 'gunicorn/19.9.0' SCRIPT_NAME = u'' HTTP_X_CSRFTOKEN = '7VTVCfcNBH1attIteG31tKMsCPKwQpNh' REQUEST_METHOD = 'POST' PATH_INFO = u'/new_expr' HTTP_ORIGIN = 'https://dcp.stanford.edu' SERVER_PROTOCOL = 'HTTP/1.1' QUERY_STRING = '' CONTENT_LENGTH = '115' HTTP_USER_AGENT = 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:88.0) Gecko/20100101 Firefox/88.0' HTTP_CONNECTION = 'Keep-Alive' HTTP_COOKIE = 'csrftoken=7VTVCfcNBH1attIteG31tKMsCPKwQpNh; _ga=GA1.2.1059466306.1622820412; _gid=GA1.2.1032619607.1622820412' SERVER_NAME = '127.0.0.1' REMOTE_ADDR = '127.0.0.1' wsgi.url_scheme = 'http' SERVER_PORT = '8000' HTTP_PRAGMA = 'no-cache' HTTP_X_REQUESTED_WITH = 'XMLHttpRequest' REMOTE_PORT = '52284' wsgi.input =