question-mark

Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

relation "wagtailcore_page" does not exist

See original GitHub issue

Issue Description

It’s not a bug, it’s a problem caused by me, and I would be grateful if someone can help me.

I am using django-1.11 and postgresql database. I wanted to implement blog using puput django package. I have deleted all the tables for wagtail and puput (a big mistake). Now when I run puput_initial_data I get the following error:

Traceback (most recent call last):
  File "manage.py", line 22, in <module>
    execute_from_command_line(sys.argv)
  File "/home/ubuntu/.local/lib/python3.5/site-packages/django/core/management/__init__.py", line 363, in execute_from_command_line
    utility.execute()
  File "/home/ubuntu/.local/lib/python3.5/site-packages/django/core/management/__init__.py", line 355, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/ubuntu/.local/lib/python3.5/site-packages/django/core/management/base.py", line 283, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/home/ubuntu/.local/lib/python3.5/site-packages/django/core/management/base.py", line 330, in execute
    output = self.handle(*args, **options)
  File "/home/ubuntu/.local/lib/python3.5/site-packages/puput/management/commands/puput_initial_data.py", line 20, in handle
    rootpage = Page.objects.first()
  File "/home/ubuntu/.local/lib/python3.5/site-packages/django/db/models/manager.py", line 85, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "/home/ubuntu/.local/lib/python3.5/site-packages/django/db/models/query.py", line 564, in first
    objects = list((self if self.ordered else self.order_by('pk'))[:1])
  File "/home/ubuntu/.local/lib/python3.5/site-packages/django/db/models/query.py", line 250, in __iter__
    self._fetch_all()
  File "/home/ubuntu/.local/lib/python3.5/site-packages/django/db/models/query.py", line 1118, in _fetch_all
    self._result_cache = list(self._iterable_class(self))
  File "/home/ubuntu/.local/lib/python3.5/site-packages/django/db/models/query.py", line 53, in __iter__
    results = compiler.execute_sql(chunked_fetch=self.chunked_fetch)
  File "/home/ubuntu/.local/lib/python3.5/site-packages/django/db/models/sql/compiler.py", line 894, in execute_sql
    raise original_exception
  File "/home/ubuntu/.local/lib/python3.5/site-packages/django/db/models/sql/compiler.py", line 884, in execute_sql
    cursor.execute(sql, params)
  File "/home/ubuntu/.local/lib/python3.5/site-packages/django/db/backends/utils.py", line 65, in execute
    return self.cursor.execute(sql, params)
  File "/home/ubuntu/.local/lib/python3.5/site-packages/django/db/utils.py", line 94, in __exit__
    six.reraise(dj_exc_type, dj_exc_value, traceback)
  File "/home/ubuntu/.local/lib/python3.5/site-packages/django/utils/six.py", line 685, in reraise
    raise value.with_traceback(tb)
  File "/home/ubuntu/.local/lib/python3.5/site-packages/django/db/backends/utils.py", line 65, in execute
    return self.cursor.execute(sql, params)
django.db.utils.ProgrammingError: relation "wagtailcore_page" does not exist
LINE 1: ...d_at", "wagtailcore_page"."live_revision_id" FROM "wagtailco...

Can somebody please help me?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8

github_iconTop GitHub Comments

1reaction
veronicabassocommented, Apr 20, 2018

I didn’t delete the whole database, only tables for wagtail and puput. I will try to rollback my migrations and retry again.

0reactions
MiltonLncommented, May 7, 2018

Thanks for your help @maximekl

Read more comments on GitHub >

github_iconTop Results From Across the Web

relation "wagtailcore_site" does not exist
ProgrammingError : relation "wagtailcore_site" does not exist#15. Created over 6 years ago. 4. The error occurs when the database is empty.
Read more >
Error while working with two databases in Django: sqlite3. ...
Error while working with two databases in Django: sqlite3.IntegrityError: NOT NULL constraint failed: wagtailcore_page.draft_title ... I'm working ...
Read more >
Model Reference
Finds the translation in the specified locale. If there is no translation in that locale, this raises a model.DoesNotExist exception. get_translation_or_none ...
Read more >
Django abstract model with flexibility to accept parameters- ...
[Solved]-Django abstract model with flexibility to accept parameters-django ... Make uuid_length a class variable in the subclass, thus: class SomeModel(BaseUuid, ...
Read more >
使用Heroku 部署時,如何解決“'django_content_type' 不存在 ...
(How can I get past this "'django_content_type' does not exist" error when ... ProgrammingError: relation "django_content_type" does not exist LINE 1: ...".
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found