2.6-development migration broken #2604

Closed
opened 2025-12-29 18:20:18 +01:00 by adam · 1 comment
Owner

Originally created by @erkib on GitHub (May 10, 2019).

Environment

  • Python version: 3.6.7
  • NetBox version: 2.6

Steps to Reproduce

  1. Run database migrations: $PYTHON manage.py migrate

Expected Behavior

Database migrations completed successfully for version 2.6

Observed Behavior

[apps@netbox-local netbox]$ /app/env/bin/python manage.py migrate
Traceback (most recent call last):
File "manage.py", line 10, in
execute_from_command_line(sys.argv)
File "/app/env/lib64/python3.6/site-packages/django/core/management/init.py", line 381, in execute_from_command_line
utility.execute()
File "/app/env/lib64/python3.6/site-packages/django/core/management/init.py", line 375, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/app/env/lib64/python3.6/site-packages/django/core/management/base.py", line 323, in run_from_argv
self.execute(*args, **cmd_options)
File "/app/env/lib64/python3.6/site-packages/django/core/management/base.py", line 361, in execute
self.check()
File "/app/env/lib64/python3.6/site-packages/django/core/management/base.py", line 390, in check
include_deployment_checks=include_deployment_checks,
File "/app/env/lib64/python3.6/site-packages/django/core/management/commands/migrate.py", line 65, in _run_checks
issues.extend(super()._run_checks(**kwargs))
File "/app/env/lib64/python3.6/site-packages/django/core/management/base.py", line 377, in _run_checks
return checks.run_checks(**kwargs)
File "/app/env/lib64/python3.6/site-packages/django/core/checks/registry.py", line 72, in run_checks
new_errors = check(app_configs=app_configs)
File "/app/env/lib64/python3.6/site-packages/django/core/checks/urls.py", line 40, in check_url_namespaces_unique
all_namespaces = _load_all_namespaces(resolver)
File "/app/env/lib64/python3.6/site-packages/django/core/checks/urls.py", line 57, in _load_all_namespaces
url_patterns = getattr(resolver, 'url_patterns', [])
File "/app/env/lib64/python3.6/site-packages/django/utils/functional.py", line 80, in get
res = instance.dict[self.name] = self.func(instance)
File "/app/env/lib64/python3.6/site-packages/django/urls/resolvers.py", line 579, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/app/env/lib64/python3.6/site-packages/django/utils/functional.py", line 80, in get
res = instance.dict[self.name] = self.func(instance)
File "/app/env/lib64/python3.6/site-packages/django/urls/resolvers.py", line 572, in urlconf_module
return import_module(self.urlconf_name)
File "/usr/lib64/python3.6/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 994, in _gcd_import
File "", line 971, in _find_and_load
File "", line 955, in _find_and_load_unlocked
File "", line 665, in _load_unlocked
File "", line 678, in exec_module
File "", line 219, in _call_with_frames_removed
File "/app/netbox/netbox/urls.py", line 7, in
from netbox.views import APIRootView, HomeView, SearchView
File "/app/netbox/netbox/views.py", line 27, in
from ipam.tables import AggregateTable, IPAddressTable, PrefixTable, VLANTable, VRFTable
File "/app/netbox/ipam/tables.py", line 5, in
from tenancy.tables import COL_TENANT, COL_TENANTGROUP_TENANT
ImportError: cannot import name 'COL_TENANTGROUP_TENANT'

Originally created by @erkib on GitHub (May 10, 2019). <!-- NOTE: This form is only for reproducible bugs. If you need assistance with NetBox installation, or if you have a general question, DO NOT open an issue. Instead, post to our mailing list: https://groups.google.com/forum/#!forum/netbox-discuss Please describe the environment in which you are running NetBox. Be sure that you are running an unmodified instance of the latest stable release before submitting a bug report. --> ### Environment * Python version: 3.6.7 * NetBox version: 2.6 <!-- Describe in detail the exact steps that someone else can take to reproduce this bug using the current stable release of NetBox (or the current beta release where applicable). Begin with the creation of any necessary database objects and call out every operation being performed explicitly. If reporting a bug in the REST API, be sure to reconstruct the raw HTTP request(s) being made: Don't rely on a wrapper like pynetbox. --> ### Steps to Reproduce 1. Run database migrations: $PYTHON manage.py migrate <!-- What did you expect to happen? --> ### Expected Behavior Database migrations completed successfully for version 2.6 <!-- What happened instead? --> ### Observed Behavior [apps@netbox-local netbox]$ /app/env/bin/python manage.py migrate Traceback (most recent call last): File "manage.py", line 10, in <module> execute_from_command_line(sys.argv) File "/app/env/lib64/python3.6/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line utility.execute() File "/app/env/lib64/python3.6/site-packages/django/core/management/__init__.py", line 375, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/app/env/lib64/python3.6/site-packages/django/core/management/base.py", line 323, in run_from_argv self.execute(*args, **cmd_options) File "/app/env/lib64/python3.6/site-packages/django/core/management/base.py", line 361, in execute self.check() File "/app/env/lib64/python3.6/site-packages/django/core/management/base.py", line 390, in check include_deployment_checks=include_deployment_checks, File "/app/env/lib64/python3.6/site-packages/django/core/management/commands/migrate.py", line 65, in _run_checks issues.extend(super()._run_checks(**kwargs)) File "/app/env/lib64/python3.6/site-packages/django/core/management/base.py", line 377, in _run_checks return checks.run_checks(**kwargs) File "/app/env/lib64/python3.6/site-packages/django/core/checks/registry.py", line 72, in run_checks new_errors = check(app_configs=app_configs) File "/app/env/lib64/python3.6/site-packages/django/core/checks/urls.py", line 40, in check_url_namespaces_unique all_namespaces = _load_all_namespaces(resolver) File "/app/env/lib64/python3.6/site-packages/django/core/checks/urls.py", line 57, in _load_all_namespaces url_patterns = getattr(resolver, 'url_patterns', []) File "/app/env/lib64/python3.6/site-packages/django/utils/functional.py", line 80, in __get__ res = instance.__dict__[self.name] = self.func(instance) File "/app/env/lib64/python3.6/site-packages/django/urls/resolvers.py", line 579, in url_patterns patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) File "/app/env/lib64/python3.6/site-packages/django/utils/functional.py", line 80, in __get__ res = instance.__dict__[self.name] = self.func(instance) File "/app/env/lib64/python3.6/site-packages/django/urls/resolvers.py", line 572, in urlconf_module return import_module(self.urlconf_name) File "/usr/lib64/python3.6/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 994, in _gcd_import File "<frozen importlib._bootstrap>", line 971, in _find_and_load File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 665, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 678, in exec_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "/app/netbox/netbox/urls.py", line 7, in <module> from netbox.views import APIRootView, HomeView, SearchView File "/app/netbox/netbox/views.py", line 27, in <module> from ipam.tables import AggregateTable, IPAddressTable, PrefixTable, VLANTable, VRFTable File "/app/netbox/ipam/tables.py", line 5, in <module> from tenancy.tables import COL_TENANT, COL_TENANTGROUP_TENANT ImportError: cannot import name 'COL_TENANTGROUP_TENANT'
adam closed this issue 2025-12-29 18:20:18 +01:00
Author
Owner

@DanSheps commented on GitHub (May 10, 2019):

It looks like you have somehow managed to merge in old history from develop to develop-2.6.

This line is not present in the current version of develop or develop-2.6.

@DanSheps commented on GitHub (May 10, 2019): It looks like you have somehow managed to merge in old history from develop to develop-2.6. This line is not present in the current version of develop or develop-2.6.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#2604