Skip to content

Instantly share code, notes, and snippets.

@filippo
Created April 2, 2017 11:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save filippo/f12a8f9e757fbabba18c1246a82d5737 to your computer and use it in GitHub Desktop.
Save filippo/f12a8f9e757fbabba18c1246a82d5737 to your computer and use it in GitHub Desktop.
Python v2.7 - Error Cheetah Unicode
# In case of unicode decoding errors in Python 2.7 we can fix with an ugly hack:
# file Compiler.py row 1579 wrap the line:
source = unicode(source)
# in a try that intercepts the error and returns the template unchanged
try:
source = unicode(source)
except UnicodeDecodeError:
pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment