ngokevin / sriracha

Image albums and gallery with local filesystem, imgur, and flickr support.
http://sriracha.ngokevin.com
0 stars 3 forks source link

We are running different versions of wok? #7

Closed uberj closed 10 years ago

uberj commented 10 years ago

This error has popped up before, but its time we actually figure out what is going on.

My version of wok is passing 2 arguments to hooks (3 if you include self), but I think your version is only expecting one (2 including self):

~/repositories/molly.cat/molly.cat(branch:master*) » ./newest-wok --version
Textile not enabled.
wok v1.0.0b
~/repositories/molly.cat/molly.cat(branch:master*) » rm -rf output && ./newest-wok --server 
Textile not enabled.
Traceback (most recent call last):
  File "/home/juber/repositories/wok/scripts/wok", line 4, in <module>
    Engine()
  File "/home/juber/repositories/wok/wok/engine.py", line 97, in __init__
    self.generate_site()
  File "/home/juber/repositories/wok/wok/engine.py", line 133, in generate_site
    self.load_pages()
  File "/home/juber/repositories/wok/wok/engine.py", line 271, in load_pages
    p = Page.from_file(os.path.join(root, f), self.options, self, renderer)
  File "/home/juber/repositories/wok/wok/page.py", line 115, in from_file
    page.build_meta()
  File "/home/juber/repositories/wok/wok/page.py", line 335, in build_meta
    self.engine.run_hook('page.meta.post', self)
  File "/home/juber/repositories/wok/wok/engine.py", line 197, in run_hook
    returns.append(hook(self.options, *args))
TypeError: get_images() takes exactly 2 arguments (3 given)

This also happens when wok tries to load the create_thumbnails hook.

The local fix for me is to add another variable to the function signature. For example:

    def get_images(self, ctx, page):
        ...
ngokevin commented 10 years ago

I'm running 1.0.0b also. Hm, we've both run into this before individually.

uberj commented 10 years ago

what commit hash is your wok at?

uberj commented 10 years ago

Mine is at https://github.com/mythmon/wok/commit/d8a1d0d390bf7597639f8dfa134bf5e68e1ffdf8

Maybe mython didn't bump the version number...

ngokevin commented 10 years ago

I think whatever pip gives.