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

Crash lg - Undefined is not JSON serializable #21

Open
takenek opened this issue Aug 14, 2017 · 0 comments
Open

Crash lg - Undefined is not JSON serializable #21

takenek opened this issue Aug 14, 2017 · 0 comments

Comments

@takenek
Copy link

takenek commented Aug 14, 2017

123.123.123.123 - - [14/Aug/2017 15:00:29] "GET /robots.txt HTTP/1.1" 500 -
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1997, in call
return self.wsgi_app(environ, start_response)
File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1985, in wsgi_app
response = self.handle_exception(e)
File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1540, in handle_exception
reraise(exc_type, exc_value, tb)
File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1982, in wsgi_app
response = self.full_dispatch_request()
File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1614, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1512, in handle_user_exception
return self.handle_http_exception(e)
File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1471, in handle_http_exception
return handler(e)
File "/opt/bird-lg-master/lg.py", line 200, in page_not_found
return render_template('error.html', warnings=["The requested URL was not found on the server."]), 404
File "/usr/lib/python2.7/dist-packages/flask/templating.py", line 134, in render_template
context, ctx.app)
File "/usr/lib/python2.7/dist-packages/flask/templating.py", line 116, in _render
rv = template.render(context)
File "/usr/lib/python2.7/dist-packages/jinja2/environment.py", line 989, in render
return self.environment.handle_exception(exc_info, True)
File "/usr/lib/python2.7/dist-packages/jinja2/environment.py", line 754, in handle_exception
reraise(exc_type, exc_value, tb)
File "/opt/bird-lg-master/templates/error.html", line 1, in top-level template code
{% extends "layout.html" %}
File "/opt/bird-lg-master/templates/layout.html", line 125, in top-level template code
history_query = {{session.history|tojson|safe}};
File "/usr/lib/python2.7/dist-packages/flask/json.py", line 269, in tojson_filter
return Markup(htmlsafe_dumps(obj, **kwargs))
File "/usr/lib/python2.7/dist-packages/flask/json.py", line 183, in htmlsafe_dumps
rv = dumps(obj, **kwargs)
File "/usr/lib/python2.7/dist-packages/flask/json.py", line 123, in dumps
rv = _json.dumps(obj, **kwargs)
File "/usr/lib/python2.7/dist-packages/simplejson/init.py", line 397, in dumps
**kw).encode(obj)
File "/usr/lib/python2.7/dist-packages/simplejson/encoder.py", line 291, in encode
chunks = self.iterencode(o, _one_shot=True)
File "/usr/lib/python2.7/dist-packages/simplejson/encoder.py", line 373, in iterencode
return _iterencode(o, 0)
File "/usr/lib/python2.7/dist-packages/flask/json.py", line 80, in default
return _json.JSONEncoder.default(self, o)
File "/usr/lib/python2.7/dist-packages/simplejson/encoder.py", line 268, in default
raise TypeError(repr(o) + " is not JSON serializable")
TypeError: Undefined is not JSON serializable

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

1 participant