Skip to content

Instantly share code, notes, and snippets.

@mythmon
Created March 13, 2012 08:46
Show Gist options
  • Select an option

  • Save mythmon/2027641 to your computer and use it in GitHub Desktop.

Select an option

Save mythmon/2027641 to your computer and use it in GitHub Desktop.
Kevin's hooks are weird
Traceback (most recent call last):
File "/home/mythmon/src/wok/scripts/wok", line 4, in <module>
Engine()
File "/home/mythmon/src/wok/wok/engine.py", line 96, in __init__
self.generate_site()
File "/home/mythmon/src/wok/wok/engine.py", line 134, in generate_site
self.render_site()
File "/home/mythmon/src/wok/wok/engine.py", line 348, in render_site
new_pages = p.render(templ_vars)
File "/home/mythmon/src/wok/wok/page.py", line 352, in render
self.engine.run_hook('page.template.pre', self, templ_vars)
File "/home/mythmon/src/wok/wok/engine.py", line 191, in run_hook
returns.append(hook(*args))
File "hooks/gallery.py", line 19, in get_albums
for album in sorted(templ_vars['site']['categories']['gallery'], key=lambda album:album['datetime']):
KeyError: 'gallery'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment