Hi all,

I just bumped into a problem I can't resolve: after adding the {%
debug %} template tag to one of my templates (no other changes), I get
the following error message:

TemplateSyntaxError at /art/

Caught an exception while rendering: 'ascii' codec can't encode
character u'\u2019' in position 19: ordinal not in range(128)

I haven't used the debug tag before, and googleing the error message
didn't bring up anything useful for me, so I am turning to the group
for help. I paste the stack trace and a subset of my settings below.

Thanks in advance for any hints,

Flo Ledermann

-------------------------------------------------------------------------

Original Traceback (most recent call last):
  File "C:\lib\Python2.5.2\lib\site-packages\django\template
\debug.py", line 71, in render_node
    result = node.render(context)
  File "C:\lib\Python2.5.2\lib\site-packages\django\template
\defaulttags.py", line 54, in render
    output = [pformat(val) for val in context]
  File "C:\lib\Python2.5.2\lib\pprint.py", line 59, in pformat
    return PrettyPrinter(indent=indent, width=width,
depth=depth).pformat(object)
  File "C:\lib\Python2.5.2\lib\pprint.py", line 111, in pformat
    self._format(object, sio, 0, 0, {}, 0)
  File "C:\lib\Python2.5.2\lib\pprint.py", line 129, in _format
    rep = self._repr(object, context, level - 1)
  File "C:\lib\Python2.5.2\lib\pprint.py", line 195, in _repr
    self._depth, level)
  File "C:\lib\Python2.5.2\lib\pprint.py", line 207, in format
    return _safe_repr(object, context, maxlevels, level)
  File "C:\lib\Python2.5.2\lib\pprint.py", line 251, in _safe_repr
    vrepr, vreadable, vrecur = saferepr(v, context, maxlevels, level)
  File "C:\lib\Python2.5.2\lib\pprint.py", line 292, in _safe_repr
    rep = repr(object)
  File "C:\lib\Python2.5.2\lib\site-packages\django\template
\loader_tags.py", line 17, in __repr__
    return "<Block Node: %s. Contents: %r>" % (self.name,
self.nodelist)
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2019' in
position 19: ordinal not in range(128)


-------------------------------------------------------------------------


ABSOLUTE_URL_OVERRIDES
{}
ALLOWED_INCLUDE_ROOTS
()
APPEND_SLASH
True
AUTHENTICATION_BACKENDS
('django.contrib.auth.backends.ModelBackend',)
AUTH_PROFILE_MODULE
'mainsite.Actor'
BANNED_IPS
()
CACHE_BACKEND
'locmem://'
CACHE_MIDDLEWARE_KEY_PREFIX
''
CACHE_MIDDLEWARE_SECONDS
600
COMMENTS_ALLOW_PROFANITIES
False
COMMENTS_BANNED_USERS_GROUP
None
COMMENTS_FIRST_FEW
0
COMMENTS_MODERATORS_GROUP
None
COMMENTS_SKETCHY_USERS_GROUP
None
DATABASE_ENGINE
'postgresql_psycopg2'
DATETIME_FORMAT
'N j, Y, P'
DATE_FORMAT
'N j, Y'
DEBUG
True
DEBUG_PROPAGATE_EXCEPTIONS
False
DEFAULT_CHARSET
'utf-8'
DEFAULT_CONTENT_TYPE
'text/html'
DEFAULT_FILE_STORAGE
'django.core.files.storage.FileSystemStorage'
DEFAULT_INDEX_TABLESPACE
''
DEFAULT_TABLESPACE
''
DISALLOWED_USER_AGENTS
()
FILE_CHARSET
'utf-8'
FILE_UPLOAD_HANDLERS
('django.core.files.uploadhandler.MemoryFileUploadHandler',
'django.core.files.uploadhandler.TemporaryFileUploadHandler')
FILE_UPLOAD_MAX_MEMORY_SIZE
2621440
FILE_UPLOAD_PERMISSIONS
None
FILE_UPLOAD_TEMP_DIR
None
FIXTURE_DIRS
()
FORCE_SCRIPT_NAME
None
IGNORABLE_404_ENDS
('mail.pl', 'mailform.pl', 'mail.cgi', 'mailform.cgi', 'favicon.ico',
'.php')
IGNORABLE_404_STARTS
('/cgi-bin/', '/_vti_bin', '/_vti_inf')
INTERNAL_IPS
()
JING_PATH
'/usr/bin/jing'
LANGUAGES
(('ar', 'Arabic'), ('bn', 'Bengali'), ('bg', 'Bulgarian'), ('ca',
'Catalan'), ('cs', 'Czech'), ('cy', 'Welsh'), ('da', 'Danish'), ('de',
'German'), ('el', 'Greek'), ('en', 'English'), ('es', 'Spanish'),
('et', 'Estonian'), ('es-ar', 'Argentinean Spanish'), ('eu',
'Basque'), ('fa', 'Persian'), ('fi', 'Finnish'), ('fr', 'French'),
('ga', 'Irish'), ('gl', 'Galician'), ('hu', 'Hungarian'), ('he',
'Hebrew'), ('hr', 'Croatian'), ('is', 'Icelandic'), ('it', 'Italian'),
('ja', 'Japanese'), ('ka', 'Georgian'), ('ko', 'Korean'), ('km',
'Khmer'), ('kn', 'Kannada'), ('lv', 'Latvian'), ('lt', 'Lithuanian'),
('mk', 'Macedonian'), ('nl', 'Dutch'), ('no', 'Norwegian'), ('pl',
'Polish'), ('pt', 'Portugese'), ('pt-br', 'Brazilian Portuguese'),
('ro', 'Romanian'), ('ru', 'Russian'), ('sk', 'Slovak'), ('sl',
'Slovenian'), ('sr', 'Serbian'), ('sv', 'Swedish'), ('ta', 'Tamil'),
('te', 'Telugu'), ('tr', 'Turkish'), ('uk', 'Ukrainian'), ('zh-cn',
'Simplified Chinese'), ('zh-tw', 'Traditional Chinese'))
LANGUAGES_BIDI
('he', 'ar', 'fa')
LANGUAGE_CODE
'en-us'
LANGUAGE_COOKIE_NAME
'django_language'
LOCALE_PATHS
()
MIDDLEWARE_CLASSES
('django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware')
MONTH_DAY_FORMAT
'F j'
PASSWORD_RESET_TIMEOUT_DAYS
'********************'
PREPEND_WWW
False
PROFANITIES_LIST
'********************'
ROOT_URLCONF
'kunstwien.urls'
SECRET_KEY
'********************'
SEND_BROKEN_LINK_EMAILS
False
SERVE_STATIC
True
SESSION_COOKIE_AGE
1209600
SESSION_COOKIE_DOMAIN
None
SESSION_COOKIE_NAME
'sessionid'
SESSION_COOKIE_PATH
'/'
SESSION_COOKIE_SECURE
False
SESSION_ENGINE
'django.contrib.sessions.backends.db'
SESSION_EXPIRE_AT_BROWSER_CLOSE
False
SESSION_FILE_PATH
None
SESSION_SAVE_EVERY_REQUEST
False
SITE_ID
1
TEMPLATE_CONTEXT_PROCESSORS
('django.core.context_processors.auth',
'django.core.context_processors.debug',
'django.core.context_processors.i18n',
'django.core.context_processors.media',
'kunstwien.mainsite.context_processors.static')
TEMPLATE_DEBUG
True
TEMPLATE_LOADERS
('django.template.loaders.filesystem.load_template_source',
'django.template.loaders.app_directories.load_template_source')
TEMPLATE_STRING_IF_INVALID
''
TEST_DATABASE_CHARSET
None
TEST_DATABASE_COLLATION
None
TEST_DATABASE_NAME
None
TEST_RUNNER
'django.test.simple.run_tests'
TIME_FORMAT
'P'
TIME_ZONE
'Europe/Vienna'
TRANSACTIONS_MANAGED
False
URL_VALIDATOR_USER_AGENT
u'Django/1.0-final-SVN-unknown (http://www.djangoproject.com)'
USE_ETAGS
False
USE_I18N
True
YEAR_MONTH_FORMAT
'F Y'
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to