UnicodeEncodeError with wheezy.template

Issue #30 resolved
created an issue

Error in template:

@def title():
  File "env/lib/python2.7/site-packages/wheezy/template/engine.py", line 82, in compile_template
    tokens = self.lexer.tokenize(template_source)
  File "env/lib/python2.7/site-packages/wheezy/template/lexer.py", line 59, in tokenize
    npos, token, value = tokenizer(m)
  File "env/lib/python2.7/site-packages/wheezy/template/ext/core.py", line 54, in var_token
    value = str(source[start:end])

Comments (4)

  1. ivanpetuhov reporter

    this change solve the problem:

    value = str(source[start:end].encode('utf-8')).decode('utf-8')

    and in template:

    @def title():
  2. Log in to comment