* Serving Flask app "/home/toto/progra/python/open-tech-pay/open-tech-pay/open-tech-pay/src/application.py"
* Environment: production
WARNING: Do not use the development server in a production environment.
Use a production WSGI server instead.
* Debug mode: off
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
[2018-05-07 16:49:54,240] ERROR in app: Exception on / [GET]
Traceback (most recent call last):
File "/home/toto/progra/python/open-tech-pay/open-tech-pay/local/lib/python2.7/site-packages/flask/app.py", line 2292, in wsgi_app
response = self.full_dispatch_request()
File "/home/toto/progra/python/open-tech-pay/open-tech-pay/local/lib/python2.7/site-packages/flask/app.py", line 1815, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/toto/progra/python/open-tech-pay/open-tech-pay/local/lib/python2.7/site-packages/flask/app.py", line 1718, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/home/toto/progra/python/open-tech-pay/open-tech-pay/local/lib/python2.7/site-packages/flask/app.py", line 1813, in full_dispatch_request
rv = self.dispatch_request()
File "/home/toto/progra/python/open-tech-pay/open-tech-pay/local/lib/python2.7/site-packages/flask/app.py", line 1799, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/home/toto/progra/python/open-tech-pay/open-tech-pay/open-tech-pay/src/application.py", line 39, in index
return render_template('app.html', preview_submissions=preview_submissions, aggregate_data=aggregate_data)
File "/home/toto/progra/python/open-tech-pay/open-tech-pay/local/lib/python2.7/site-packages/flask/templating.py", line 135, in render_template
context, ctx.app)
File "/home/toto/progra/python/open-tech-pay/open-tech-pay/local/lib/python2.7/site-packages/flask/templating.py", line 117, in _render
rv = template.render(context)
File "/home/toto/progra/python/open-tech-pay/open-tech-pay/local/lib/python2.7/site-packages/jinja2/environment.py", line 1008, in render
return self.environment.handle_exception(exc_info, True)
File "/home/toto/progra/python/open-tech-pay/open-tech-pay/local/lib/python2.7/site-packages/jinja2/environment.py", line 780, in handle_exception
reraise(exc_type, exc_value, tb)
File "/home/toto/progra/python/open-tech-pay/open-tech-pay/open-tech-pay/src/templates/app.html", line 2, in top-level template code
{% extends "base.html" %}
File "/home/toto/progra/python/open-tech-pay/open-tech-pay/open-tech-pay/src/templates/base.html", line 59, in top-level template code
{% block content %}{% endblock %}
File "/home/toto/progra/python/open-tech-pay/open-tech-pay/open-tech-pay/src/templates/app.html", line 24, in block "content"
<strong>{{ "${:,.0f}".format(aggregate_data['average_salary']) }} (CAD)</strong> per year and has
ValueError: Unknown format code 'f' for object of type 'str'
127.0.0.1 - - [07/May/2018 16:49:54] "GET / HTTP/1.1" 500 -
Casting {:,.0f} to {} seems to solve the issue.