First time here? Check out the FAQ!
0

DatabaseError: relation "robots_rule" does not exist LINE 1

Hello, I have received this error but im not sure for to fix this. Im using askbot 0.7.49 , django 1.4, Postgres 9.3, and as per installation instruction, i have sync the DB (python manage.py syncdb), and also run the migration code (python manage.py migrate askbot AND python manage.py migrate django_authopenid #embedded login application). Could somebody help me? Thank you.

" Traceback (most recent call last):

File "/home/ec2-user/teachqa/lib/python2.6/site-packages/django/core/handlers/base.py", line 136, in get_response response = response.render()

File "/home/ec2-user/teachqa/lib/python2.6/site-packages/django/template/response.py", line 104, in render self._set_content(self.rendered_content)

File "/home/ec2-user/teachqa/lib/python2.6/site-packages/django/template/response.py", line 81, in rendered_content content = template.render(context)

File "/home/ec2-user/teachqa/lib/python2.6/site-packages/django/template/base.py", line 140, in render return self._render(context)

File "/home/ec2-user/teachqa/lib/python2.6/site-packages/django/template/base.py", line 134, in _render return self.nodelist.render(context)

File "/home/ec2-user/teachqa/lib/python2.6/site-packages/django/template/base.py", line 823, in render bit = self.render_node(node, context)

File "/home/ec2-user/teachqa/lib/python2.6/site-packages/django/template/base.py", line 837, in render_node return node.render(context)

File "/home/ec2-user/teachqa/lib/python2.6/site-packages/django/template/defaulttags.py", line 280, in render if match:

File "/home/ec2-user/teachqa/lib/python2.6/site-packages/django/db/models/query.py", line 130, in __nonzero__ iter(self).next()

File "/home/ec2-user/teachqa/lib/python2.6/site-packages/django/db/models/query.py", line 118, in _result_iter self._fill_cache()

File "/home/ec2-user/teachqa/lib/python2.6/site-packages/django/db/models/query.py", line 875, in _fill_cache self._result_cache.append(self._iter.next())

File "/home/ec2-user/teachqa/lib/python2.6/site-packages/django/db/models/query.py", line 291, in iterator for row in compiler.results_iter():

File "/home/ec2-user/teachqa/lib/python2.6/site-packages/django/db/models/sql/compiler.py", line 763, in results_iter for rows in self.execute_sql(MULTI):

File "/home/ec2-user/teachqa/lib/python2.6/site-packages/django/db/models/sql/compiler.py", line 818, in execute_sql cursor.execute(sql, params)

File "/home/ec2-user/teachqa/lib/python2.6/site-packages/django/db/backends/postgresql_psycopg2/base.py", line 52, in execute return self.cursor.execute(query, args)

DatabaseError: relation "robots_rule" does not exist LINE 1: ...s_rule"."robot", "robots_rule"."crawl_delay" FROM "robots_ru... ^ "

Lidya's avatar
3
Lidya
asked 2014-04-07 21:24:18 -0500, updated 2014-04-07 21:37:19 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

2 Answers

0

Try python manage.py migrate, without specifying the apps. That should migrate the "robots" application.

Another version of the command is python manage.py syncdb --migrate --noinput the --noinput parameter will run the command without asking you extra questions. The --migrate applies migrations after the syncdb.

Evgeny's avatar
13.2k
Evgeny
answered 2014-04-07 22:07:34 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments
0

Hello,

Thanks for your prompt reply.

I have also done the python manage.py migrate, but it seems that all up to date. Do you have any other solution i can try?

Running migrations for longerusername: - Nothing to migrate. - Loading initial data for longerusername. Installed 0 object(s) from 0 fixture(s)

Running migrations for askbot: - Nothing to migrate. - Loading initial data for askbot. Installed 0 object(s) from 0 fixture(s)

Running migrations for django_authopenid: - Nothing to migrate. - Loading initial data for django_authopenid. Installed 0 object(s) from 0 fixture(s)

Running migrations for robots: - Nothing to migrate. - Loading initial data for robots. Installed 0 object(s) from 0 fixture(s)

Running migrations for djcelery: - Nothing to migrate. - Loading initial data for djcelery. Installed 0 object(s) from 0 fixture(s)

Running migrations for group_messaging: - Nothing to migrate. - Loading initial data for group_messaging. Installed 0 object(s) from 0 fixture(s)

Lidya's avatar
3
Lidya
answered 2014-04-07 22:12:57 -0500
edit flag offensive 0 remove flag delete link

Comments

Maybe the 'robots' app is not in the `INSTALLED_APPS`?

Evgeny's avatar Evgeny (2014-04-07 22:15:54 -0500) edit

Hello, Thanks again for your assistance. I just checked, but it's in there. Is there any other possibilities? INSTALLED_APPS = ( 'longerusername', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.staticfiles', #all of these are needed for the askbot 'django.contrib.admin', 'django.contrib.humanize', 'django.contrib.sitemaps', 'django.contrib.messages', #'debug_toolbar', #Optional, to enable haystack search #'haystack', 'compressor', 'askbot', 'askbot.deps.django_authopenid', #'askbot.importers.stackexchange', #se loader 'south', 'askbot.deps.livesettings', 'keyedcache', 'robots', 'django_countries', 'djcelery', 'djkombu', 'followit', 'tinymce', 'group_messaging', #'avatar',#experimental use git clone git://github.com/ericflo/django-avatar.git$ )

Lidya's avatar Lidya (2014-04-07 22:22:42 -0500) edit
add a comment see more comments