django-admin-interface: migrate fails at "change_related_modal_background_opacity_type"

Hi there. Thanks for the great interface. I’m trying to migrate from a function setup with Python 3.6, Django 2.1.5, and admin-interface 0.9.1 . When I run migrate on my development computer I end up with the following traceback. I’m happy to help debug but the process of debugging if I can.

` Applying admin_interface.0008_change_related_modal_background_opacity_type…Traceback (most recent call last): File “/home/ace/.local/share/virtualenvs/website-10j77PrM/lib/python3.6/site-packages/django/db/backends/utils.py”, line 85, in _execute return self.cursor.execute(sql, params) psycopg2.OperationalError: server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request.

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File “/home/ace/.local/share/virtualenvs/website-10j77PrM/lib/python3.6/site-packages/django/db/migrations/executor.py”, line 244, in apply_migration state = migration.apply(state, schema_editor) File “/home/ace/.local/share/virtualenvs/website-10j77PrM/lib/python3.6/site-packages/django/db/migrations/migration.py”, line 124, in apply operation.database_forwards(self.app_label, schema_editor, old_state, project_state) File “/home/ace/.local/share/virtualenvs/website-10j77PrM/lib/python3.6/site-packages/django/db/migrations/operations/fields.py”, line 216, in database_forwards schema_editor.alter_field(from_model, from_field, to_field) File “/home/ace/.local/share/virtualenvs/website-10j77PrM/lib/python3.6/site-packages/django/db/backends/base/schema.py”, line 523, in alter_field old_db_params, new_db_params, strict) File “/home/ace/.local/share/virtualenvs/website-10j77PrM/lib/python3.6/site-packages/django/db/backends/postgresql/schema.py”, line 122, in _alter_field new_db_params, strict, File “/home/ace/.local/share/virtualenvs/website-10j77PrM/lib/python3.6/site-packages/django/db/backends/base/schema.py”, line 663, in _alter_field params, File “/home/ace/.local/share/virtualenvs/website-10j77PrM/lib/python3.6/site-packages/django/db/backends/base/schema.py”, line 133, in execute cursor.execute(sql, params) File “/home/ace/.local/share/virtualenvs/website-10j77PrM/lib/python3.6/site-packages/django/db/backends/utils.py”, line 100, in execute return super().execute(sql, params) File “/home/ace/.local/share/virtualenvs/website-10j77PrM/lib/python3.6/site-packages/django/db/backends/utils.py”, line 68, in execute return self._execute_with_wrappers(sql, params, many=False, executor=self._execute) File “/home/ace/.local/share/virtualenvs/website-10j77PrM/lib/python3.6/site-packages/django/db/backends/utils.py”, line 77, in _execute_with_wrappers return executor(sql, params, many, context) File “/home/ace/.local/share/virtualenvs/website-10j77PrM/lib/python3.6/site-packages/django/db/backends/utils.py”, line 85, in _execute return self.cursor.execute(sql, params) File “/home/ace/.local/share/virtualenvs/website-10j77PrM/lib/python3.6/site-packages/django/db/utils.py”, line 89, in exit raise dj_exc_value.with_traceback(traceback) from exc_value File “/home/ace/.local/share/virtualenvs/website-10j77PrM/lib/python3.6/site-packages/django/db/backends/utils.py”, line 85, in _execute return self.cursor.execute(sql, params) django.db.utils.OperationalError: server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request.

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File “/home/ace/.local/share/virtualenvs/website-10j77PrM/lib/python3.6/site-packages/django/db/backends/base/base.py”, line 216, in ensure_connection self.connect() File “/home/ace/.local/share/virtualenvs/website-10j77PrM/lib/python3.6/site-packages/django/db/backends/base/base.py”, line 194, in connect self.connection = self.get_new_connection(conn_params) File “/home/ace/.local/share/virtualenvs/website-10j77PrM/lib/python3.6/site-packages/django/db/backends/postgresql/base.py”, line 178, in get_new_connection connection = Database.connect(**conn_params) File “/home/ace/.local/share/virtualenvs/website-10j77PrM/lib/python3.6/site-packages/psycopg2/init.py”, line 130, in connect conn = _connect(dsn, connection_factory=connection_factory, **kwasync) psycopg2.OperationalError: FATAL: the database system is in recovery mode

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File “manage.py”, line 30, in <module> execute_from_command_line(sys.argv) File “/home/ace/.local/share/virtualenvs/website-10j77PrM/lib/python3.6/site-packages/django/core/management/init.py”, line 381, in execute_from_command_line utility.execute() File “/home/ace/.local/share/virtualenvs/website-10j77PrM/lib/python3.6/site-packages/django/core/management/init.py”, line 375, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File “/home/ace/.local/share/virtualenvs/website-10j77PrM/lib/python3.6/site-packages/django/core/management/base.py”, line 316, in run_from_argv self.execute(*args, **cmd_options) File “/home/ace/.local/share/virtualenvs/website-10j77PrM/lib/python3.6/site-packages/django/core/management/base.py”, line 353, in execute output = self.handle(*args, **options) File “/home/ace/.local/share/virtualenvs/website-10j77PrM/lib/python3.6/site-packages/django/core/management/base.py”, line 83, in wrapped res = handle_func(*args, **kwargs) File “/home/ace/.local/share/virtualenvs/website-10j77PrM/lib/python3.6/site-packages/django/core/management/commands/migrate.py”, line 203, in handle fake_initial=fake_initial, File “/home/ace/.local/share/virtualenvs/website-10j77PrM/lib/python3.6/site-packages/django/db/migrations/executor.py”, line 117, in migrate state = self._migrate_all_forwards(state, plan, full_plan, fake=fake, fake_initial=fake_initial) File “/home/ace/.local/share/virtualenvs/website-10j77PrM/lib/python3.6/site-packages/django/db/migrations/executor.py”, line 147, in _migrate_all_forwards state = self.apply_migration(state, migration, fake=fake, fake_initial=fake_initial) File “/home/ace/.local/share/virtualenvs/website-10j77PrM/lib/python3.6/site-packages/django/db/migrations/executor.py”, line 244, in apply_migration state = migration.apply(state, schema_editor) File “/home/ace/.local/share/virtualenvs/website-10j77PrM/lib/python3.6/site-packages/django/db/backends/base/schema.py”, line 108, in exit self.atomic.exit(exc_type, exc_value, traceback) File “/home/ace/.local/share/virtualenvs/website-10j77PrM/lib/python3.6/site-packages/django/db/transaction.py”, line 256, in exit connection.set_autocommit(True) File “/home/ace/.local/share/virtualenvs/website-10j77PrM/lib/python3.6/site-packages/django/db/backends/base/base.py”, line 394, in set_autocommit self.ensure_connection() File “/home/ace/.local/share/virtualenvs/website-10j77PrM/lib/python3.6/site-packages/django/db/backends/base/base.py”, line 216, in ensure_connection self.connect() File “/home/ace/.local/share/virtualenvs/website-10j77PrM/lib/python3.6/site-packages/django/db/utils.py”, line 89, in exit raise dj_exc_value.with_traceback(traceback) from exc_value File “/home/ace/.local/share/virtualenvs/website-10j77PrM/lib/python3.6/site-packages/django/db/backends/base/base.py”, line 216, in ensure_connection self.connect() File “/home/ace/.local/share/virtualenvs/website-10j77PrM/lib/python3.6/site-packages/django/db/backends/base/base.py”, line 194, in connect self.connection = self.get_new_connection(conn_params) File “/home/ace/.local/share/virtualenvs/website-10j77PrM/lib/python3.6/site-packages/django/db/backends/postgresql/base.py”, line 178, in get_new_connection connection = Database.connect(**conn_params) File “/home/ace/.local/share/virtualenvs/website-10j77PrM/lib/python3.6/site-packages/psycopg2/init.py”, line 130, in connect conn = _connect(dsn, connection_factory=connection_factory, **kwasync) django.db.utils.OperationalError: FATAL: the database system is in recovery `mode``

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 1
  • Comments: 16 (14 by maintainers)

Commits related to this issue

Most upvoted comments

Yes I saw that mailing list too, but I don’t think that could be the case, I think the problem comes from altering double precision to varchar, I tested the query directly in postgres and the result was same, So it has nothing to do with this app in particular but removing the field and adding it again in migration can solve the problem.