Error when run CNProg on my computer

3 views
Skip to first unread message

alt.os.development

unread,
Oct 10, 2009, 5:37:58 AM10/10/09
to CNProg open discussion
I have install all programs follow the Install file.
I got this messages as below when run CNProg, anybody can give me a
hand,

thank you in advance!

Environment:

Request Method: GET
Request URL: http://127.0.0.1:8000/
Django Version: 1.1
Python Version: 2.5.4
Installed Applications:
['django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.admin',
'django.contrib.humanize',
'forum',
'django_authopenid']
Installed Middleware:
('django.middleware.gzip.GZipMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.middleware.transaction.TransactionMiddleware')


Template error:
In template d:\cnprog-cnprog-ca1cf62\templates\index.html, error at
line 32
Caught an exception while rendering: (1054, "Unknown column
'auth_user.email_isvalid' in 'field list'")
22 : <div class="headQuestions">{% trans "Questions" %}</div>


23 : <div class="tabsA">


24 : <a id="latest" href="?sort=latest" title="{% trans "last
updated questions" %}" >{% trans "newest" %}</a>


25 : <a id="hottest" href="?sort=hottest" title="{% trans
"hottest questions" %}" >{% trans "hottest" %}</a>


26 : <a id="mostvoted" href="?sort=mostvoted" title="{%
trans "most voted questions" %}" >{% trans "most voted" %}</a>


27 : <a id="all" href="/questions/" title="{% trans "all
questions" %}" >{% trans "all questions" %}</a>


28 : </div>


29 : </div>


30 : <!-- 问题列表 -->


31 : <div id="listA">


32 : {% for question in questions %}


33 : <div class="qstA">


34 : <h2>


35 : <a href="{{ question.get_absolute_url }}"
title="{{ question.summary }}...">


36 : {{ question.get_question_title }}


37 : </a>


38 : </h2>


39 : <div class="stat">


40 : <table>


41 : <tr>


42 : <td><span class="num">
{{ question.answer_count|intcomma }}</span> </td>


Traceback:
File "C:\Python25\Lib\site-packages\django\core\handlers\base.py" in
get_response
92. response = callback(request, *callback_args,
**callback_kwargs)
File "" in index
97. }, context_instance=RequestContext
(request))
File "C:\Python25\Lib\site-packages\django\shortcuts\__init__.py" in
render_to_response
20. return HttpResponse(loader.render_to_string(*args,
**kwargs), **httpresponse_kwargs)
File "C:\Python25\Lib\site-packages\django\template\loader.py" in
render_to_string
108. return t.render(context_instance)
File "C:\Python25\Lib\site-packages\django\template\__init__.py" in
render
178. return self.nodelist.render(context)
File "C:\Python25\Lib\site-packages\django\template\__init__.py" in
render
779. bits.append(self.render_node(node, context))
File "C:\Python25\Lib\site-packages\django\template\debug.py" in
render_node
71. result = node.render(context)
File "C:\Python25\Lib\site-packages\django\template\loader_tags.py" in
render
97. return compiled_parent.render(context)
File "C:\Python25\Lib\site-packages\django\template\__init__.py" in
render
178. return self.nodelist.render(context)
File "C:\Python25\Lib\site-packages\django\template\__init__.py" in
render
779. bits.append(self.render_node(node, context))
File "C:\Python25\Lib\site-packages\django\template\debug.py" in
render_node
71. result = node.render(context)
File "C:\Python25\Lib\site-packages\django\template\loader_tags.py" in
render
24. result = self.nodelist.render(context)
File "C:\Python25\Lib\site-packages\django\template\__init__.py" in
render
779. bits.append(self.render_node(node, context))
File "C:\Python25\Lib\site-packages\django\template\debug.py" in
render_node
81. raise wrapped

Exception Type: TemplateSyntaxError at /
Exception Value: Caught an exception while rendering: (1054, "Unknown
column 'auth_user.email_isvalid' in 'field list'")

Original Traceback (most recent call last):
File "C:\Python25\Lib\site-packages\django\template\debug.py", line
71, in render_node
result = node.render(context)
File "C:\Python25\Lib\site-packages\django\template\defaulttags.py",
line 126, in render
len_values = len(values)
File "C:\Python25\Lib\site-packages\django\db\models\query.py", line
81, in __len__
self._result_cache = list(self.iterator())
File "C:\Python25\Lib\site-packages\django\db\models\query.py", line
238, in iterator
for row in self.query.results_iter():
File "C:\Python25\Lib\site-packages\django\db\models\sql\query.py",
line 287, in results_iter
for rows in self.execute_sql(MULTI):
File "C:\Python25\Lib\site-packages\django\db\models\sql\query.py",
line 2369, in execute_sql
cursor.execute(sql, params)
File "C:\Python25\Lib\site-packages\django\db\backends\util.py",
line 19, in execute
return self.cursor.execute(sql, params)
File "C:\Python25\Lib\site-packages\django\db\backends\mysql
\base.py", line 84, in execute
return self.cursor.execute(query, args)
File "C:\Python25\Lib\site-packages\MySQLdb\cursors.py", line 166,
in execute
self.errorhandler(self, exc, value)
File "C:\Python25\Lib\site-packages\MySQLdb\connections.py", line
35, in defaulterrorhandler
raise errorclass, errorvalue
OperationalError: (1054, "Unknown column 'auth_user.email_isvalid' in
'field list'")

Chagel

unread,
Oct 12, 2009, 12:05:35 PM10/12/09
to CNProg open discussion
Hi,

Try to execute following SQL statement for your database:
ALTER TABLE auth_user ADD COLUMN email_isvalid TINYINT(1) NOT NULL;
UPDATE auth_user SET email_isvalid=1;
ALTER TABLE auth_user ADD COLUMN email_key varchar(32);

These can be found under sql_scripts folder.

Regards,
-Mike
Reply all
Reply to author
Forward
0 new messages