Created
April 2, 2017 11:06
-
-
Save filippo/f12a8f9e757fbabba18c1246a82d5737 to your computer and use it in GitHub Desktop.
Python v2.7 - Error Cheetah Unicode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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