TemplateSyntaxError at /polls/

Caught OperationFailure while rendering: command SON([('count', u'post'), ('query', {'_types': 'Post'}), ('fields', None)]) failed: db assertion failure
Request Method: GET
Request URL: http://127.0.0.1/polls/
Django Version: 1.2.3
Exception Type: TemplateSyntaxError
Exception Value:
Caught OperationFailure while rendering: command SON([('count', u'post'), ('query', {'_types': 'Post'}), ('fields', None)]) failed: db assertion failure
Exception Location: C:\Python25\Lib\site-packages\pymongo\helpers.py in _check_command_response, line 119
Python Executable: D:\Program Files\Apache Software Foundation\Apache2.2\bin\httpd.exe
Python Version: 2.5.0
Python Path: ['C:/Python25', 'D:/wamp/apps/', 'D:/wamp/apps/mysite', '/django', 'C:/Python25/Lib/site-packages', 'C:\\Python25\\lib\\site-packages\\django_cms-2.0.2-py2.5.egg', 'C:\\Python25\\lib\\site-packages\\mongoengine-0.4-py2.5.egg', 'D:\\Program Files\\Apache Software Foundation\\Apache2.2\\$PWD', 'C:\\Python25\\python25.zip', 'C:\\Python25\\DLLs', 'C:\\Python25\\lib', 'C:\\Python25\\lib\\plat-win', 'C:\\Python25\\lib\\lib-tk', 'D:\\Program Files\\Apache Software Foundation\\Apache2.2\\bin', 'C:\\Python25', 'C:\\Python25\\lib\\site-packages', 'C:\\Python25\\lib\\site-packages\\win32', 'C:\\Python25\\lib\\site-packages\\win32\\lib', 'C:\\Python25\\lib\\site-packages\\Pythonwin']
Server time: Thu, 25 Nov 2010 15:29:27 +0800

Template error

In template d:\www\django\templates\polls\index.html, error at line 1

Caught OperationFailure while rendering: command SON([('count', u'post'), ('query', {'_types': 'Post'}), ('fields', None)]) failed: db assertion failure

1 {% if latest_poll_list %}
2 <ul>
3 {% for post in latest_poll_list %}
4 <li><a href="/polls/{{ post.title }}/">{{ post.title }}</a></li>
5 {% endfor %}
6 </ul>
7 {% else %}
8 <p>No post are available.</p>
9 {% endif %}
10

Traceback Switch to copy-and-paste view

Request information

GET

No GET data

POST

No POST data

FILES

No FILES data

Variable Value
csrftoken
'240365db7ff7aa84529afdf9b78472e3'

META

Variable Value
AUTH_TYPE
None
CONTENT_LENGTH
0
CONTENT_TYPE
None
CSRF_COOKIE
'240365db7ff7aa84529afdf9b78472e3'
GATEWAY_INTERFACE
'CGI/1.1'
HTTP_ACCEPT
'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'
HTTP_ACCEPT_CHARSET
'ISO-8859-1,utf-8;q=0.7,*;q=0.7'
HTTP_ACCEPT_ENCODING
'gzip,deflate'
HTTP_ACCEPT_LANGUAGE
'en-us,en;q=0.5'
HTTP_CONNECTION
'keep-alive'
HTTP_COOKIE
'csrftoken=240365db7ff7aa84529afdf9b78472e3'
HTTP_HOST
'127.0.0.1'
HTTP_KEEP_ALIVE
'115'
HTTP_USER_AGENT
'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12 (.NET CLR 3.5.30729)'
PATH_INFO
u'/polls/'
PATH_TRANSLATED
None
QUERY_STRING
None
REMOTE_ADDR
'127.0.0.1'
REMOTE_HOST
None
REMOTE_IDENT
None
REMOTE_USER
None
REQUEST_METHOD
'GET'
SCRIPT_NAME
'/mysite'
SERVER_NAME
'localhost'
SERVER_PORT
80
SERVER_PROTOCOL
'HTTP/1.1'
SERVER_SOFTWARE
'mod_python'

Settings

Using settings module settings

Setting Value
ABSOLUTE_URL_OVERRIDES
{}
ADMINS
()
ADMIN_FOR
()
ADMIN_MEDIA_PREFIX
'/media/'
ALLOWED_INCLUDE_ROOTS
()
APPEND_SLASH
True
AUTHENTICATION_BACKENDS
('mongoengine.django.auth.MongoEngineBackend',)
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
CSRF_COOKIE_DOMAIN
None
CSRF_COOKIE_NAME
'csrftoken'
CSRF_FAILURE_VIEW
'django.views.csrf.csrf_failure'
DATABASES
{'default': {'ENGINE': 'django.db.backends.dummy', 'HOST': '', 'NAME': '', 'OPTIONS': {}, 'PASSWORD': '********************', 'PORT': '', 'TEST_CHARSET': None, 'TEST_COLLATION': None, 'TEST_MIRROR': None, 'TEST_NAME': None, 'TIME_ZONE': 'America/Chicago', 'USER': ''}}
DATABASE_ENGINE
''
DATABASE_HOST
''
DATABASE_NAME
''
DATABASE_OPTIONS
{}
DATABASE_PASSWORD
'********************'
DATABASE_PORT
''
DATABASE_ROUTERS
[]
DATABASE_USER
''
DATETIME_FORMAT
'N j, Y, P'
DATETIME_INPUT_FORMATS
('%Y-%m-%d %H:%M:%S', '%Y-%m-%d %H:%M', '%Y-%m-%d', '%m/%d/%Y %H:%M:%S', '%m/%d/%Y %H:%M', '%m/%d/%Y', '%m/%d/%y %H:%M:%S', '%m/%d/%y %H:%M', '%m/%d/%y')
DATE_FORMAT
'N j, Y'
DATE_INPUT_FORMATS
('%Y-%m-%d', '%m/%d/%Y', '%m/%d/%y', '%b %d %Y', '%b %d, %Y', '%d %b %Y', '%d %b, %Y', '%B %d %Y', '%B %d, %Y', '%d %B %Y', '%d %B, %Y')
DEBUG
True
DEBUG_PROPAGATE_EXCEPTIONS
False
DECIMAL_SEPARATOR
'.'
DEFAULT_CHARSET
'utf-8'
DEFAULT_CONTENT_TYPE
'text/html'
DEFAULT_FILE_STORAGE
'django.core.files.storage.FileSystemStorage'
DEFAULT_FROM_EMAIL
'webmaster@localhost'
DEFAULT_INDEX_TABLESPACE
''
DEFAULT_TABLESPACE
''
DISALLOWED_USER_AGENTS
()
EMAIL_BACKEND
'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST
'localhost'
EMAIL_HOST_PASSWORD
'********************'
EMAIL_HOST_USER
''
EMAIL_PORT
25
EMAIL_SUBJECT_PREFIX
'[Django] '
EMAIL_USE_TLS
False
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
FIRST_DAY_OF_WEEK
0
FIXTURE_DIRS
()
FORCE_SCRIPT_NAME
None
FORMAT_MODULE_PATH
None
IGNORABLE_404_ENDS
('mail.pl', 'mailform.pl', 'mail.cgi', 'mailform.cgi', 'favicon.ico', '.php')
IGNORABLE_404_STARTS
('/cgi-bin/', '/_vti_bin', '/_vti_inf')
INSTALLED_APPS
['django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.admin', 'polls', 'virus']
INTERNAL_IPS
()
LANGUAGES
(('ar', 'Arabic'), ('bg', 'Bulgarian'), ('bn', 'Bengali'), ('bs', 'Bosnian'), ('ca', 'Catalan'), ('cs', 'Czech'), ('cy', 'Welsh'), ('da', 'Danish'), ('de', 'German'), ('el', 'Greek'), ('en', 'English'), ('en-gb', 'British English'), ('es', 'Spanish'), ('es-ar', 'Argentinian Spanish'), ('et', 'Estonian'), ('eu', 'Basque'), ('fa', 'Persian'), ('fi', 'Finnish'), ('fr', 'French'), ('fy-nl', 'Frisian'), ('ga', 'Irish'), ('gl', 'Galician'), ('he', 'Hebrew'), ('hi', 'Hindi'), ('hr', 'Croatian'), ('hu', 'Hungarian'), ('id', 'Indonesian'), ('is', 'Icelandic'), ('it', 'Italian'), ('ja', 'Japanese'), ('ka', 'Georgian'), ('km', 'Khmer'), ('kn', 'Kannada'), ('ko', 'Korean'), ('lt', 'Lithuanian'), ('lv', 'Latvian'), ('mk', 'Macedonian'), ('ml', 'Malayalam'), ('mn', 'Mongolian'), ('nl', 'Dutch'), ('no', 'Norwegian'), ('nb', 'Norwegian Bokmal'), ('nn', 'Norwegian Nynorsk'), ('pl', 'Polish'), ('pt', 'Portuguese'), ('pt-br', 'Brazilian Portuguese'), ('ro', 'Romanian'), ('ru', 'Russian'), ('sk', 'Slovak'), ('sl', 'Slovenian'), ('sq', 'Albanian'), ('sr', 'Serbian'), ('sr-latn', 'Serbian Latin'), ('sv', 'Swedish'), ('ta', 'Tamil'), ('te', 'Telugu'), ('th', 'Thai'), ('tr', 'Turkish'), ('uk', 'Ukrainian'), ('vi', 'Vietnamese'), ('zh-cn', 'Simplified Chinese'), ('zh-tw', 'Traditional Chinese'))
LANGUAGES_BIDI
('he', 'ar', 'fa')
LANGUAGE_CODE
'en-us'
LANGUAGE_COOKIE_NAME
'django_language'
LOCALE_PATHS
()
LOGIN_REDIRECT_URL
'/accounts/profile/'
LOGIN_URL
'/accounts/login/'
LOGOUT_URL
'/accounts/logout/'
MANAGERS
()
MEDIA_ROOT
''
MEDIA_URL
''
MESSAGE_STORAGE
'django.contrib.messages.storage.user_messages.LegacyFallbackStorage'
MIDDLEWARE_CLASSES
('django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware')
MONTH_DAY_FORMAT
'F j'
NUMBER_GROUPING
0
PASSWORD_RESET_TIMEOUT_DAYS
'********************'
PREPEND_WWW
False
PROFANITIES_LIST
'********************'
Q
<class 'mongoengine.queryset.Q'>
ROOT_URLCONF
'urls'
SECRET_KEY
'********************'
SEND_BROKEN_LINK_EMAILS
False
SERVER_EMAIL
'root@localhost'
SESSION_COOKIE_AGE
1209600
SESSION_COOKIE_DOMAIN
None
SESSION_COOKIE_NAME
'sessionid'
SESSION_COOKIE_PATH
'/'
SESSION_COOKIE_SECURE
False
SESSION_ENGINE
'mongoengine.django.sessions'
SESSION_EXPIRE_AT_BROWSER_CLOSE
False
SESSION_FILE_PATH
None
SESSION_SAVE_EVERY_REQUEST
False
SETTINGS_MODULE
'settings'
SHORT_DATETIME_FORMAT
'm/d/Y P'
SHORT_DATE_FORMAT
'm/d/Y'
SITE_ID
1
TEMPLATE_CONTEXT_PROCESSORS
('django.contrib.auth.context_processors.auth', 'django.core.context_processors.debug', 'django.core.context_processors.i18n', 'django.core.context_processors.media', 'django.contrib.messages.context_processors.messages')
TEMPLATE_DEBUG
True
TEMPLATE_DIRS
('D:/www/django/templates',)
TEMPLATE_LOADERS
('django.template.loaders.filesystem.Loader', 'django.template.loaders.app_directories.Loader')
TEMPLATE_STRING_IF_INVALID
''
TEST_DATABASE_CHARSET
None
TEST_DATABASE_COLLATION
None
TEST_DATABASE_NAME
None
TEST_RUNNER
'django.test.simple.DjangoTestSuiteRunner'
THOUSAND_SEPARATOR
','
TIME_FORMAT
'P'
TIME_INPUT_FORMATS
('%H:%M:%S', '%H:%M')
TIME_ZONE
'America/Chicago'
TRANSACTIONS_MANAGED
False
URL_VALIDATOR_USER_AGENT
'Django/1.2.3 (http://www.djangoproject.com)'
USE_ETAGS
False
USE_I18N
True
USE_L10N
True
USE_THOUSAND_SEPARATOR
False
YEAR_MONTH_FORMAT
'F Y'

You're seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard 500 page.