robertcsapo / ciscodnacnetbox

Cisco DNA Center Integration with NetBox
Other
34 stars 16 forks source link

Error when trying to install ciscodnacnetbox 3.0.5 on Netbox v3.2.0 #6

Closed st0rmshadow closed 2 years ago

st0rmshadow commented 2 years ago

python3 manage.py migrate Traceback (most recent call last): File "manage.py", line 10, in execute_from_command_line(sys.argv) File "/opt/netbox/venv/lib/python3.8/site-packages/django/core/management/init.py", line 446, in execute_from_command_line utility.execute() File "/opt/netbox/venv/lib/python3.8/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.8/site-packages/django/core/management/base.py", line 414, in run_from_argv self.execute(*args, cmd_options) File "/opt/netbox/venv/lib/python3.8/site-packages/django/core/management/base.py", line 460, in execute output = self.handle(*args, *options) File "/opt/netbox/venv/lib/python3.8/site-packages/django/core/management/base.py", line 98, in wrapped res = handle_func(args, kwargs) File "/opt/netbox/venv/lib/python3.8/site-packages/django/core/management/commands/migrate.py", line 91, in handle self.check(databases=[database]) File "/opt/netbox/venv/lib/python3.8/site-packages/django/core/management/base.py", line 487, in check all_issues = checks.run_checks( File "/opt/netbox/venv/lib/python3.8/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.8/site-packages/django/core/checks/urls.py", line 14, in check_url_config return check_resolver(resolver) File "/opt/netbox/venv/lib/python3.8/site-packages/django/core/checks/urls.py", line 24, in check_resolver return check_method() File "/opt/netbox/venv/lib/python3.8/site-packages/django/urls/resolvers.py", line 480, in check for pattern in self.url_patterns: File "/opt/netbox/venv/lib/python3.8/site-packages/django/utils/functional.py", line 49, in get res = instance.dict[self.name] = self.func(instance) File "/opt/netbox/venv/lib/python3.8/site-packages/django/urls/resolvers.py", line 696, in url_patterns patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) File "/opt/netbox/venv/lib/python3.8/site-packages/django/utils/functional.py", line 49, in get res = instance.dict[self.name] = self.func(instance) File "/opt/netbox/venv/lib/python3.8/site-packages/django/urls/resolvers.py", line 689, in urlconf_module return import_module(self.urlconf_name) File "/usr/lib/python3.8/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1014, in _gcd_import File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 671, in _load_unlocked File "", line 848, in exec_module File "", line 219, in _call_with_frames_removed File "/opt/netbox/netbox/netbox/urls.py", line 9, in from extras.plugins.urls import plugin_admin_patterns, plugin_patterns, plugin_api_patterns File "/opt/netbox/netbox/extras/plugins/urls.py", line 28, in urlpatterns = import_object(f"{plugin_path}.urls.urlpatterns") File "/opt/netbox/netbox/extras/plugins/utils.py", line 31, in import_object spec.loader.exec_module(module) File "/opt/netbox/venv/lib/python3.8/site-packages/ciscodnacnetbox/urls.py", line 2, in from . import views File "/opt/netbox/venv/lib/python3.8/site-packages/ciscodnacnetbox/views.py", line 13, in from .forms import SettingsForm File "/opt/netbox/venv/lib/python3.8/site-packages/ciscodnacnetbox/forms.py", line 2, in from extras.forms import CustomFieldModelForm ImportError: cannot import name 'CustomFieldModelForm' from 'extras.forms' (/opt/netbox/netbox/extras/forms/init.py)

Unable to startup netbox with plugin turned on due to the form Issue. Any advice be much appreciated.

I tried to find the forms definitions to change them but havn't had any luck yet. Looks like it may be between chane on netbox 2.10 to 3.0 CustomForm Change

robertcsapo commented 2 years ago

I'll take a look how 3.2 behaves with CustomFieldModelForm https://github.com/robertcsapo/ciscodnacnetbox/blob/0656068af8f38e8712f27906edd8a089532cf8f6/ciscodnacnetbox/forms.py#L2

robertcsapo commented 2 years ago

You can use ciscodnacnetbox==3.2.1 with netbox v3.2

mwalton42 commented 2 years ago

Awesome! Thank you anything I can do to help let me know.

Sincerely,

Michael Walton Senior Network Engineer, Hagee Ministries (210) 494 3900 From: robertcsapo @.> Sent: Wednesday, April 20, 2022 9:46 AM To: robertcsapo/ciscodnacnetbox @.> Cc: Subscribed @.***> Subject: Re: [robertcsapo/ciscodnacnetbox] Error when trying to install ciscodnacnetbox 3.0.5 on Netbox v3.2.0 (Issue #6)

I'll take a look how 3.2 behaves with CustomFieldModelForm https://github.com/robertcsapo/ciscodnacnetbox/blob/0656068af8f38e8712f27906edd8a089532cf8f6/ciscodnacnetbox/forms.py#L2

— Reply to this email directly, view it on GitHubhttps://github.com/robertcsapo/ciscodnacnetbox/issues/6#issuecomment-1104019219, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AYYPEZ4Q3T6ALFZLSCL6QZTVGAKAXANCNFSM5TOOJFLQ. You are receiving this because you are subscribed to this thread.Message ID: @.***>