redwind
redwind copied to clipboard
KeyError: oldskool
I think there is some kind of race condition in the flask_themes2 library, where very occasionally its dictionary won't be filled in by the time the view is trying to render.
2015-06-03 05:35:51,362 - redwind - ERROR - Exception on /tags/hypocrisy [GET]
Traceback (most recent call last):
File "/srv/www/kylewm.com/redwind/venv/lib/python3.4/site-packages/flask/app.py", line 1817, in wsgi_app
response = self.full_dispatch_request()
File "/srv/www/kylewm.com/redwind/venv/lib/python3.4/site-packages/flask/app.py", line 1477, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/srv/www/kylewm.com/redwind/venv/lib/python3.4/site-packages/flask/app.py", line 1381, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/srv/www/kylewm.com/redwind/venv/lib/python3.4/site-packages/flask/_compat.py", line 33, in reraise
raise value
File "/srv/www/kylewm.com/redwind/venv/lib/python3.4/site-packages/flask/app.py", line 1475, in full_dispatch_request
rv = self.dispatch_request()
File "/srv/www/kylewm.com/redwind/venv/lib/python3.4/site-packages/flask/app.py", line 1461, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "./redwind/views.py", line 246, in posts_by_tag
return render_posts(title, posts, older)
File "./redwind/views.py", line 156, in render_posts
atom_title=atom_title, events=events)
File "./redwind/util.py", line 432, in render_themed
return render_theme_template(get_theme(ident), template, **context)
File "/srv/www/kylewm.com/redwind/venv/lib/python3.4/site-packages/flask_themes2/__init__.py", line 147, in get_theme
return ctx.app.theme_manager.themes[ident]
KeyError: 'oldskool'