diff --git a/django/template/__init__.py b/django/template/__init__.py index 81cd75d804..a9e00a51af 100644 --- a/django/template/__init__.py +++ b/django/template/__init__.py @@ -706,7 +706,12 @@ def resolve_variable(path, context): raise del bits[0] if isinstance(current, (basestring, Promise)): - current = force_unicode(current) + try: + current = force_unicode(current) + except UnicodeDecodeError: + # Failing to convert to unicode can happen sometimes (e.g. debug + # tracebacks). So we allow it in this particular instance. + pass return current class Node(object):