First time here? Check out the FAQ!

Revision history  [back]

DatabaseError while searching for people

For instance I want to execute a search query by name:

example.com/users/by-group/2/everyone/?search=&t=user&query=john

It throws this error:

Traceback (most recent call last):

File "/rest/u/apps/askbot_face/ve/lib/python2.6/site-packages/django/core/handlers/base.py", line 111, in get_response response = callback(request, callback_args, *callback_kwargs)

File "/rest/u/apps/askbot_face/ve/lib/python2.6/site-packages/askbot/views/users.py", line 159, in show_users users_page = objects_list.page(page)

File "/rest/u/apps/askbot_face/ve/lib/python2.6/site-packages/django/core/paginator.py", line 37, in page number = self.validate_number(number)

File "/rest/u/apps/askbot_face/ve/lib/python2.6/site-packages/django/core/paginator.py", line 28, in validate_number if number > self.num_pages:

File "/rest/u/apps/askbot_face/ve/lib/python2.6/site-packages/django/core/paginator.py", line 60, in _get_num_pages if self.count == 0 and not self.allow_empty_first_page:

File "/rest/u/apps/askbot_face/ve/lib/python2.6/site-packages/django/core/paginator.py", line 48, in _get_count self._count = self.object_list.count()

File "/rest/u/apps/askbot_face/ve/lib/python2.6/site-packages/django/db/models/query.py", line 351, in count return self.query.get_count(using=self.db)

File "/rest/u/apps/askbot_face/ve/lib/python2.6/site-packages/django/db/models/sql/query.py", line 418, in get_count number = obj.get_aggregation(using=using)[None]

File "/rest/u/apps/askbot_face/ve/lib/python2.6/site-packages/django/db/models/sql/query.py", line 384, in get_aggregation result = query.get_compiler(using).execute_sql(SINGLE)

File "/rest/u/apps/askbot_face/ve/lib/python2.6/site-packages/django/db/models/sql/compiler.py", line 818, in execute_sql cursor.execute(sql, params)

File "/rest/u/apps/askbot_face/ve/lib/python2.6/site-packages/django/db/backends/postgresql_psycopg2/base.py", line 52, in execute return self.cursor.execute(query, args)

DatabaseError: column "language_code" does not exist LINE 1: ...text_search_vector @@ plainto_tsquery('john') AND language_c... ^ Why this column is missing and how it can be properly restored?

Thank you.