Exception during upgrade #5054

Closed
opened 2025-12-29 19:23:36 +01:00 by adam · 0 comments
Owner

Originally created by @njohnsn on GitHub (Jul 8, 2021).

NetBox version

v2.11.9

Python version

3.8

Steps to Reproduce

  1. Upgrading from 2.11.2 to 2.11.9 Following steps on website.
  2. run sudo ./upgrade.sh

Expected Behavior

Succesfully upgrade from 2.11.2 to 2.11.9

Observed Behavior

The following exception was raised:

Collecting static files (python3 netbox/manage.py collectstatic --no-input)...

209 static files copied to '/opt/netbox-2.9.11/netbox/static', 770 unmodified.
Removing stale content types (python3 netbox/manage.py remove_stale_contenttypes --no-input)...
Traceback (most recent call last):
  File "/opt/netbox-2.9.11/venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 84, in _execute
    return self.cursor.execute(sql, params)
psycopg2.errors.UndefinedColumn: column extras_objectchange.object_data does not exist
LINE 1: ..._object_id", "extras_objectchange"."object_repr", "extras_ob...
                                                             ^


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

Traceback (most recent call last):
  File "netbox/manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/opt/netbox-2.9.11/venv/lib/python3.8/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line
    utility.execute()
  File "/opt/netbox-2.9.11/venv/lib/python3.8/site-packages/django/core/management/__init__.py", line 395, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/opt/netbox-2.9.11/venv/lib/python3.8/site-packages/django/core/management/base.py", line 330, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/opt/netbox-2.9.11/venv/lib/python3.8/site-packages/django/core/management/base.py", line 371, in execute
    output = self.handle(*args, **options)
  File "/opt/netbox-2.9.11/venv/lib/python3.8/site-packages/django/contrib/contenttypes/management/commands/remove_stale_contenttypes.py", line 83, in handle
    ct.delete()
  File "/opt/netbox-2.9.11/venv/lib/python3.8/site-packages/django/db/models/base.py", line 943, in delete
    collector.collect([self], keep_parents=keep_parents)
  File "/opt/netbox-2.9.11/venv/lib/python3.8/site-packages/django/db/models/deletion.py", line 295, in collect
    if sub_objs:
  File "/opt/netbox-2.9.11/venv/lib/python3.8/site-packages/django/db/models/query.py", line 291, in __bool__
    self._fetch_all()
  File "/opt/netbox-2.9.11/venv/lib/python3.8/site-packages/cacheops/query.py", line 283, in _fetch_all
    self._result_cache = list(self._iterable_class(self))
  File "/opt/netbox-2.9.11/venv/lib/python3.8/site-packages/django/db/models/query.py", line 53, in __iter__
    results = compiler.execute_sql(chunked_fetch=self.chunked_fetch, chunk_size=self.chunk_size)
  File "/opt/netbox-2.9.11/venv/lib/python3.8/site-packages/django/db/models/sql/compiler.py", line 1154, in execute_sql
    cursor.execute(sql, params)
  File "/opt/netbox-2.9.11/venv/lib/python3.8/site-packages/cacheops/transaction.py", line 93, in execute
    result = self._no_monkey.execute(self, sql, params)
  File "/opt/netbox-2.9.11/venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 66, in execute
    return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
  File "/opt/netbox-2.9.11/venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 75, in _execute_with_wrappers
    return executor(sql, params, many, context)
  File "/opt/netbox-2.9.11/venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 84, in _execute
    return self.cursor.execute(sql, params)
  File "/opt/netbox-2.9.11/venv/lib/python3.8/site-packages/django/db/utils.py", line 90, in __exit__
    raise dj_exc_value.with_traceback(traceback) from exc_value
  File "/opt/netbox-2.9.11/venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 84, in _execute
    return self.cursor.execute(sql, params)
django.db.utils.ProgrammingError: column extras_objectchange.object_data does not exist
LINE 1: ..._object_id", "extras_objectchange"."object_repr", "extras_ob...
Originally created by @njohnsn on GitHub (Jul 8, 2021). ### NetBox version v2.11.9 ### Python version 3.8 ### Steps to Reproduce 1. Upgrading from 2.11.2 to 2.11.9 Following steps on website. 2. run sudo ./upgrade.sh ### Expected Behavior Succesfully upgrade from 2.11.2 to 2.11.9 ### Observed Behavior The following exception was raised: ``` Collecting static files (python3 netbox/manage.py collectstatic --no-input)... 209 static files copied to '/opt/netbox-2.9.11/netbox/static', 770 unmodified. Removing stale content types (python3 netbox/manage.py remove_stale_contenttypes --no-input)... Traceback (most recent call last): File "/opt/netbox-2.9.11/venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 84, in _execute return self.cursor.execute(sql, params) psycopg2.errors.UndefinedColumn: column extras_objectchange.object_data does not exist LINE 1: ..._object_id", "extras_objectchange"."object_repr", "extras_ob... ^ The above exception was the direct cause of the following exception: Traceback (most recent call last): File "netbox/manage.py", line 10, in <module> execute_from_command_line(sys.argv) File "/opt/netbox-2.9.11/venv/lib/python3.8/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line utility.execute() File "/opt/netbox-2.9.11/venv/lib/python3.8/site-packages/django/core/management/__init__.py", line 395, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/opt/netbox-2.9.11/venv/lib/python3.8/site-packages/django/core/management/base.py", line 330, in run_from_argv self.execute(*args, **cmd_options) File "/opt/netbox-2.9.11/venv/lib/python3.8/site-packages/django/core/management/base.py", line 371, in execute output = self.handle(*args, **options) File "/opt/netbox-2.9.11/venv/lib/python3.8/site-packages/django/contrib/contenttypes/management/commands/remove_stale_contenttypes.py", line 83, in handle ct.delete() File "/opt/netbox-2.9.11/venv/lib/python3.8/site-packages/django/db/models/base.py", line 943, in delete collector.collect([self], keep_parents=keep_parents) File "/opt/netbox-2.9.11/venv/lib/python3.8/site-packages/django/db/models/deletion.py", line 295, in collect if sub_objs: File "/opt/netbox-2.9.11/venv/lib/python3.8/site-packages/django/db/models/query.py", line 291, in __bool__ self._fetch_all() File "/opt/netbox-2.9.11/venv/lib/python3.8/site-packages/cacheops/query.py", line 283, in _fetch_all self._result_cache = list(self._iterable_class(self)) File "/opt/netbox-2.9.11/venv/lib/python3.8/site-packages/django/db/models/query.py", line 53, in __iter__ results = compiler.execute_sql(chunked_fetch=self.chunked_fetch, chunk_size=self.chunk_size) File "/opt/netbox-2.9.11/venv/lib/python3.8/site-packages/django/db/models/sql/compiler.py", line 1154, in execute_sql cursor.execute(sql, params) File "/opt/netbox-2.9.11/venv/lib/python3.8/site-packages/cacheops/transaction.py", line 93, in execute result = self._no_monkey.execute(self, sql, params) File "/opt/netbox-2.9.11/venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 66, in execute return self._execute_with_wrappers(sql, params, many=False, executor=self._execute) File "/opt/netbox-2.9.11/venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 75, in _execute_with_wrappers return executor(sql, params, many, context) File "/opt/netbox-2.9.11/venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 84, in _execute return self.cursor.execute(sql, params) File "/opt/netbox-2.9.11/venv/lib/python3.8/site-packages/django/db/utils.py", line 90, in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value File "/opt/netbox-2.9.11/venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 84, in _execute return self.cursor.execute(sql, params) django.db.utils.ProgrammingError: column extras_objectchange.object_data does not exist LINE 1: ..._object_id", "extras_objectchange"."object_repr", "extras_ob... ```
adam added the type: bug label 2025-12-29 19:23:36 +01:00
adam closed this issue 2025-12-29 19:23:36 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#5054