Hi all,
I saw some errors post like mine but I still can find a solution to my
problem.
I get the error below when trying to call to a view I wrote.
Since I'm trying to solve this issue for few hours - I will appreciate
any help.
NOTE that I already had Python version 2.7 and it did not work as
well.


Environment:


Request Method: GET
Request URL: http://127.0.0.1:8000/summary/

Django Version: 1.3.1
Python Version: 2.6.0
Installed Applications:
['django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'wlist',
 'django.contrib.admin']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware')


Traceback:
File "C:\Python26\lib\site-packages\django\core\handlers\base.py" in
get_response
  111.                         response = callback(request,
*callback_args, **callback_kwargs)
File "C:\Python26\Scripts\wish_list_app\..\wish_list_app\wlist
\views.py" in wish_list_summary
  13.     return render_to_response('wish_list_summary.html',
{ 'wish_lists_summary': wish_lists_summary })
File "C:\Python26\Lib\site-packages\django\shortcuts\__init__.py" in
render_to_response
  20.     return HttpResponse(loader.render_to_string(*args,
**kwargs), **httpresponse_kwargs)
File "C:\Python26\Lib\site-packages\django\template\loader.py" in
render_to_string
  181.         t = get_template(template_name)
File "C:\Python26\Lib\site-packages\django\template\loader.py" in
get_template
  157.     template, origin = find_template(template_name)
File "C:\Python26\Lib\site-packages\django\template\loader.py" in
find_template
  134.             source, display_name = loader(name, dirs)
File "C:\Python26\Lib\site-packages\django\template\loader.py" in
__call__
  42.         return self.load_template(template_name, template_dirs)
File "C:\Python26\Lib\site-packages\django\template\loader.py" in
load_template
  45.         source, display_name =
self.load_template_source(template_name, template_dirs)
File "C:\Python26\Lib\site-packages\django\template\loaders
\filesystem.py" in load_template_source
  39.                     return
(file.read().decode(settings.FILE_CHARSET), filepath)
File "C:\Python26\lib\encodings\utf_8.py" in decode
  16.     return codecs.utf_8_decode(input, errors, True)

Exception Type: UnicodeDecodeError at /summary/
Exception Value: ('utf8', '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML
1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
\n<html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en"
dir="ltr">\n  <head>\n \xa0 \xa0<meta http-equiv="Content-Type"
content="text/html;/>\n \xa0 \xa0<title>To-do List Status Report</
title>\n \xa0</head>\n \xa0<body>\xa0\n \xa0 \xa0<h1>To-do list status
report</h1>\n{% for list_dict in todo_listing %}\n \xa0
\xa0<h2>{{ list_dict.list_object.title }}</h2>\n \xa0 \xa0<ul>\n \xa0
\xa0 \xa0<li>Number of items: {{ list_dict.item_count }}</li>\n \xa0
\xa0 \xa0<li>Number completed: {{ list_dict.items_complete }}
({{ list_dict.percent_complete }}%)</li>\n \xa0 \xa0</ul>\n{% endfor %}
\n \xa0</body>\n</html>', 198, 199, 'unexpected code byte')

-- 
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