Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error if no 'en' translation #45

Closed
davidak opened this issue Feb 28, 2016 · 1 comment
Closed

Error if no 'en' translation #45

davidak opened this issue Feb 28, 2016 · 1 comment
Assignees

Comments

@davidak
Copy link

davidak commented Feb 28, 2016

Coil throws this error if you don't have 'en' as language or translation.

Traceback (most recent call last):
  File "/usr/local/lib/python3.5/site-packages/flask/app.py", line 1836, in __call__
    return self.wsgi_app(environ, start_response)
  File "/usr/local/lib/python3.5/site-packages/flask/app.py", line 1820, in wsgi_app
    response = self.make_response(self.handle_exception(e))
  File "/usr/local/lib/python3.5/site-packages/flask/app.py", line 1403, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python3.5/site-packages/flask/_compat.py", line 33, in reraise
    raise value
  File "/usr/local/lib/python3.5/site-packages/flask/app.py", line 1817, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python3.5/site-packages/flask/app.py", line 1477, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python3.5/site-packages/flask/app.py", line 1381, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python3.5/site-packages/flask/_compat.py", line 33, in reraise
    raise value
  File "/usr/local/lib/python3.5/site-packages/flask/app.py", line 1475, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python3.5/site-packages/flask/app.py", line 1461, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/usr/local/lib/python3.5/site-packages/flask_login.py", line 758, in decorated_view
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.5/site-packages/coil/web.py", line 666, in index
    return render('coil_index.tmpl', context)
  File "/usr/local/lib/python3.5/site-packages/coil/web.py", line 366, in render
    return _site.render_template(template_name, None, context), code, headers
  File "/usr/local/lib/python3.5/site-packages/nikola/nikola.py", line 1165, in render_template
    template_name, None, local_context)
  File "/usr/local/lib/python3.5/site-packages/nikola/plugins/template/mako.py", line 108, in render_template
    data = template.render_unicode(**context)
  File "/usr/local/lib/python3.5/site-packages/mako/template.py", line 454, in render_unicode
    as_unicode=True)
  File "/usr/local/lib/python3.5/site-packages/mako/runtime.py", line 829, in _render
    **_kwargs_for_callable(callable_, data))
  File "/usr/local/lib/python3.5/site-packages/mako/runtime.py", line 864, in _render_context
    _exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
  File "/usr/local/lib/python3.5/site-packages/mako/runtime.py", line 890, in _exec_template
    callable_(context, *args, **kwargs)
  File "/Users/davidak/my_coil_site/cache/.mako.tmp/base.tmpl.py", line 71, in render_body
    __M_writer(str(set_locale(lang)))
  File "/usr/local/lib/python3.5/site-packages/nikola/utils.py", line 1166, in set_locale
    self.__set_locale(lang)
  File "/usr/local/lib/python3.5/site-packages/nikola/utils.py", line 1151, in __set_locale
    locale_n = self.locales[lang]
KeyError: 'en'
@Kwpolska Kwpolska self-assigned this Mar 3, 2016
@Kwpolska
Copy link
Member

Kwpolska commented Mar 3, 2016

Fixed in v1.3.9. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants