getnikola / nikola-themes

Themes for Nikola
https://themes.getnikola.com/
71 stars 51 forks source link

Can't find GLOBAL_CONTEXT in config dict (reveal theme) #123

Closed madduck closed 7 years ago

madduck commented 7 years ago

Even though I added the GLOBAL_CONTEXT.update() call to conf.py, trying to compile a site with the reveal theme, I get the following traceback. The bug seems to be in the handling of deprecation warnings in Nikola itself though.

Traceback (most recent call last):
  File "/home/madduck/.bin/nikola", line 11, in <module>
    load_entry_point('Nikola==7.8.5', 'console_scripts', 'nikola')()
  File "/home/madduck/code/nikola/.ve/lib/python3.4/site-packages/nikola/__main__.py", line 167, in main
    site = Nikola(**config)
  File "/home/madduck/code/nikola/.ve/lib/python3.4/site-packages/nikola/nikola.py", line 953, in __init__
    ('subtheme' not in config.GLOBAL_CONTEXT or 'transition' not in config.GLOBAL_CONTEXT))):
AttributeError: 'dict' object has no attribute 'GLOBAL_CONTEXT'
Kwpolska commented 7 years ago

Sorry for that, I mixed up the types there. This bug was fixed on GitHub master recently by @ralsina, so update to that, or just backport the one-line patch to your nikola.py.

ralsina commented 7 years ago

@Kwpolska we should use bunches, which work both like dicts and like objects, like in JS :-)