html_render.py

This should raise a NameError.  The `keys` key you use here is not bound to anything.