whosonfirst / whosonfirst-www-spelunker

A simple Flask-based spelunker for poking around Who's On First data
BSD 3-Clause "New" or "Revised" License
7 stars 9 forks source link

Account for missing tags #101

Closed thisisaaronland closed 7 years ago

thisisaaronland commented 7 years ago
[2017-06-06 22:16:54,788] ERROR in app: Exception on /recent/ [GET]
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1982, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1614, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1517, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1612, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1598, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/usr/local/mapzen/whosonfirst-www-spelunker/www/server.py", line 326, in lastmod_week
    return lastmod_days(7)
  File "/usr/local/mapzen/whosonfirst-www-spelunker/www/server.py", line 392, in lastmod_days
    return flask.render_template('recent.html', **template_args)
  File "/usr/local/lib/python2.7/dist-packages/flask/templating.py", line 134, in render_template
    context, ctx.app)
  File "/usr/local/lib/python2.7/dist-packages/flask/templating.py", line 116, in _render
    rv = template.render(context)
  File "/usr/local/lib/python2.7/dist-packages/jinja2/environment.py", line 1008, in render
    return self.environment.handle_exception(exc_info, True)
  File "/usr/local/lib/python2.7/dist-packages/jinja2/environment.py", line 780, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/mapzen/whosonfirst-www-spelunker/www/templates/recent.html", line 1, in top-level template code
    {% extends "base.html" %}
  File "/usr/local/mapzen/whosonfirst-www-spelunker/www/templates/base.html", line 120, in top-level template code
    {% block content %}{% endblock %}
  File "/usr/local/mapzen/whosonfirst-www-spelunker/www/templates/recent.html", line 47, in block "content"
    {% include "inc_docs.html" %}
  File "/usr/local/mapzen/whosonfirst-www-spelunker/www/templates/inc_docs.html", line 60, in top-level template code
    <li>it is tagged {% for t in doc.properties['wof:tags'] %}<a href="{{ url_for('tag', tag=t) }}">{{ t|e }}</a>{% if loop.last %}{% elif loop.index == loop.length -1 %} and {% else %}, {% endif %}{% endfor %}</li>
  File "/usr/local/lib/python2.7/dist-packages/flask/helpers.py", line 333, in url_for
    return appctx.app.handle_url_build_error(error, endpoint, values)
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1805, in handle_url_build_error
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python2.7/dist-packages/flask/helpers.py", line 323, in url_for
    force_external=external)
  File "/usr/local/lib/python2.7/dist-packages/werkzeug/routing.py", line 1768, in build
    raise BuildError(endpoint, values, method, self)
BuildError: Could not build url for endpoint 'tag'. Did you forget to specify values ['tag']?