Ask Your Question

FieldError: Cannot resolve keyword 'answer' into field.

asked 2012-03-16 09:29:55 -0500

Olloff's avatar

updated 2012-03-16 09:46:56 -0500

Hello, all!

Next is error I've got after selecting any of the previous versions of my edits. How can I fix it?

Traceback (most recent call last):

 File "/var/src/askbot-devel/askbot_env/lib/python2.5/site-packages/Django-1.3.1-py2.5.egg/django/core/handlers/", line 111, in get_response
   response = callback(request, *callback_args, **callback_kwargs)

 File "/var/src/askbot-devel/askbot_env/lib/python2.5/site-packages/Django-1.3.1-py2.5.egg/django/contrib/auth/", line 23, in _wrapped_view
   return view_func(request, *args, **kwargs)

 File "/var/src/askbot-devel/askbot_env/lib/python2.5/site-packages/Django-1.3.1-py2.5.egg/django/utils/", line 93, in _wrapped_view
   response = view_func(request, *args, **kwargs)

 File "/var/src/askbot-devel/askbot/utils/", line 217, in wrapper
   return view_func(request, *args, **kwargs)

 File "/var/src/askbot-devel/askbot/views/", line 427, in edit_answer
   revision = rev

 File "/var/src/askbot-devel/askbot_env/lib/python2.5/site-packages/Django-1.3.1-py2.5.egg/django/db/models/", line 341, in get
   clone = self.filter(*args, **kwargs)

 File "/var/src/askbot-devel/askbot_env/lib/python2.5/site-packages/Django-1.3.1-py2.5.egg/django/db/models/", line 550, in filter
   return self._filter_or_exclude(False, *args, **kwargs)

 File "/var/src/askbot-devel/askbot_env/lib/python2.5/site-packages/Django-1.3.1-py2.5.egg/django/db/models/", line 568, in _filter_or_exclude
   clone.query.add_q(Q(*args, **kwargs))

 File "/var/src/askbot-devel/askbot_env/lib/python2.5/site-packages/Django-1.3.1-py2.5.egg/django/db/models/sql/", line 1194, in add_q
   can_reuse=used_aliases, force_having=force_having)

 File "/var/src/askbot-devel/askbot_env/lib/python2.5/site-packages/Django-1.3.1-py2.5.egg/django/db/models/sql/", line 1069, in add_filter
   negate=negate, process_extras=process_extras)

 File "/var/src/askbot-devel/askbot_env/lib/python2.5/site-packages/Django-1.3.1-py2.5.egg/django/db/models/sql/", line 1260, in setup_joins
   "Choices are: %s" % (name, ", ".join(names)))

**FieldError: Cannot resolve keyword 'answer' into field. Choices are: author, id, is_anonymous, post, revised_at, revision, revision_type, summary, tagnames, text, title**

Python: 2.5, Askbot: git-6e44222a68bc9edb506ab6598621532cbe6f5ced, Mysql-python: 1.2.3, MySQL: Ver 14.12 Distrib 5.0.51a

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2012-03-16 09:54:20 -0500

Evgeny's avatar

Thanks! Just fixed in the repo.

We have migrated models from Question, Answer, and Comment to just Post, this bug was due to not changing reference from answer to post.

edit flag offensive delete link more


Thanks, Eugeny!

Olloff's avatar Olloff  ( 2012-03-16 10:15:09 -0500 )edit

Besides, I pull lastest git-8a8cde4fb9957ad829682870ec9dc87f0fe50ac7 from repo and do " syncdb & migrate", but problem still in sight. Sorry, fixed after Apache restart.

Olloff's avatar Olloff  ( 2012-03-16 10:19:07 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2012-03-16 09:29:55 -0500

Seen: 6,698 times

Last updated: Mar 16 '12