Closed kemeris2000 closed 1 year ago
ObjectContactsView
is introduced in NetBox v3.5.2 with https://github.com/netbox-community/netbox/pull/12460. If you upgrade your version, this issue will be resolved.
Thank you, after upgrade plugin is working.
NetBox Secrets plugin version
v1.8.2
NetBox version
v3.5.1
Steps to Reproduce
configuration.py: PLUGINS_CONFIG = { 'netbox_secrets': { 'display_default': 'right_page', 'public_key_size': 4096 } }
pip install --upgrade netbox-secrets source /opt/netbox/venv/bin/activate manage.py migrate
Expected Behavior
Successful update
Observed Behavior
Applying database migrations (python3 netbox/manage.py migrate)... Traceback (most recent call last): File "/opt/netbox/netbox/manage.py", line 10, in
execute_from_command_line(sys.argv)
File "/opt/netbox/venv/lib/python3.9/site-packages/django/core/management/init.py", line 446, in execute_from_command_line
utility.execute()
File "/opt/netbox/venv/lib/python3.9/site-packages/django/core/management/init.py", line 440, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/opt/netbox/venv/lib/python3.9/site-packages/django/core/management/base.py", line 402, in run_from_argv
self.execute(*args, cmd_options)
File "/opt/netbox/venv/lib/python3.9/site-packages/django/core/management/base.py", line 448, in execute
output = self.handle(*args, *options)
File "/opt/netbox/venv/lib/python3.9/site-packages/django/core/management/base.py", line 96, in wrapped
res = handle_func(args, kwargs)
File "/opt/netbox/venv/lib/python3.9/site-packages/django/core/management/commands/migrate.py", line 97, in handle
self.check(databases=[database])
File "/opt/netbox/venv/lib/python3.9/site-packages/django/core/management/base.py", line 475, in check
all_issues = checks.run_checks(
File "/opt/netbox/venv/lib/python3.9/site-packages/django/core/checks/registry.py", line 88, in run_checks
new_errors = check(app_configs=app_configs, databases=databases)
File "/opt/netbox/venv/lib/python3.9/site-packages/django/core/checks/urls.py", line 14, in check_url_config
return check_resolver(resolver)
File "/opt/netbox/venv/lib/python3.9/site-packages/django/core/checks/urls.py", line 24, in check_resolver
return check_method()
File "/opt/netbox/venv/lib/python3.9/site-packages/django/urls/resolvers.py", line 494, in check
for pattern in self.url_patterns:
File "/opt/netbox/venv/lib/python3.9/site-packages/django/utils/functional.py", line 57, in get
res = instance.dict[self.name] = self.func(instance)
File "/opt/netbox/venv/lib/python3.9/site-packages/django/urls/resolvers.py", line 715, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/opt/netbox/venv/lib/python3.9/site-packages/django/utils/functional.py", line 57, in get
res = instance.dict[self.name] = self.func(instance)
File "/opt/netbox/venv/lib/python3.9/site-packages/django/urls/resolvers.py", line 708, in urlconf_module
return import_module(self.urlconf_name)
File "/usr/lib/python3.9/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "", line 790, in exec_module
File "", line 228, in _call_with_frames_removed
File "/opt/netbox/netbox/netbox/urls.py", line 8, in
from extras.plugins.urls import plugin_admin_patterns, plugin_patterns, plugin_api_patterns
File "/opt/netbox/netbox/extras/plugins/urls.py", line 31, in
urlpatterns = import_string(f"{plugin_path}.urls.urlpatterns")
File "/opt/netbox/venv/lib/python3.9/site-packages/django/utils/module_loading.py", line 30, in import_string
return cached_import(module_path, class_name)
File "/opt/netbox/venv/lib/python3.9/site-packages/django/utils/module_loading.py", line 15, in cached_import
module = import_module(module_path)
File "/usr/lib/python3.9/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/opt/netbox/venv/lib/python3.9/site-packages/netbox_secrets/urls.py", line 4, in
from . import views
File "/opt/netbox/venv/lib/python3.9/site-packages/netbox_secrets/views.py", line 15, in
from tenancy.views import ObjectContactsView
ImportError: cannot import name 'ObjectContactsView' from 'tenancy.views' (/opt/netbox/netbox/tenancy/views.py)