vapor-ware / netbox-virtual-circuit-plugin

A plugin for NetBox that supports Virtual Circuit management
GNU General Public License v3.0
57 stars 19 forks source link

cannot import name 'BulkDeleteView' from 'utilities.views' #51

Closed mickaelmonsieur closed 3 years ago

mickaelmonsieur commented 3 years ago

Hello, I have installation error:

(venv) root@netbox:/opt/netbox/netbox# python3 manage.py migrate
Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/opt/netbox/venv/lib/python3.7/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line
    utility.execute()
  File "/opt/netbox/venv/lib/python3.7/site-packages/django/core/management/__init__.py", line 395, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/opt/netbox/venv/lib/python3.7/site-packages/django/core/management/base.py", line 330, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/opt/netbox/venv/lib/python3.7/site-packages/django/core/management/base.py", line 371, in execute
    output = self.handle(*args, **options)
  File "/opt/netbox/venv/lib/python3.7/site-packages/django/core/management/base.py", line 85, in wrapped
    res = handle_func(*args, **kwargs)
  File "/opt/netbox/venv/lib/python3.7/site-packages/django/core/management/commands/migrate.py", line 75, in handle
    self.check(databases=[database])
  File "/opt/netbox/venv/lib/python3.7/site-packages/django/core/management/base.py", line 396, in check
    databases=databases,
  File "/opt/netbox/venv/lib/python3.7/site-packages/django/core/checks/registry.py", line 70, in run_checks
    new_errors = check(app_configs=app_configs, databases=databases)
  File "/opt/netbox/venv/lib/python3.7/site-packages/django/core/checks/urls.py", line 13, in check_url_config
    return check_resolver(resolver)
  File "/opt/netbox/venv/lib/python3.7/site-packages/django/core/checks/urls.py", line 23, in check_resolver
    return check_method()
  File "/opt/netbox/venv/lib/python3.7/site-packages/django/urls/resolvers.py", line 408, in check
    for pattern in self.url_patterns:
  File "/opt/netbox/venv/lib/python3.7/site-packages/django/utils/functional.py", line 48, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "/opt/netbox/venv/lib/python3.7/site-packages/django/urls/resolvers.py", line 589, in url_patterns
    patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
  File "/opt/netbox/venv/lib/python3.7/site-packages/django/utils/functional.py", line 48, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "/opt/netbox/venv/lib/python3.7/site-packages/django/urls/resolvers.py", line 582, in urlconf_module
    return import_module(self.urlconf_name)
  File "/usr/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/opt/netbox/netbox/netbox/urls.py", line 8, in <module>
    from extras.plugins.urls import plugin_admin_patterns, plugin_patterns, plugin_api_patterns
  File "/opt/netbox/netbox/extras/plugins/urls.py", line 28, in <module>
    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.7/site-packages/netbox_virtual_circuit_plugin/urls.py", line 2, in <module>
    from . import views
  File "/opt/netbox/venv/lib/python3.7/site-packages/netbox_virtual_circuit_plugin/views.py", line 4, in <module>
    from utilities.views import BulkDeleteView, ObjectEditView, ObjectListView, ObjectDeleteView
ImportError: cannot import name 'BulkDeleteView' from 'utilities.views' (/opt/netbox/netbox/utilities/views.py)

Python version: 3.7.3 NetBox version: 2.10.3

mickaelmonsieur commented 3 years ago

In Netbox, I have :

<class 'django.urls.exceptions.NoReverseMatch'>

'netbox_virtual_circuit_plugin' is not a registered namespace inside 'plugins'

Python version: 3.7.3
NetBox version: 2.10.3
hoanhan101 commented 3 years ago

I'm seeing that you're using NetBox 2.10.3 which is currently not supported by the plugin. However, one this PR lands (https://github.com/vapor-ware/netbox-virtual-circuit-plugin/pull/53), that would fix it.

marcoceppi commented 3 years ago

This should be fixed in 1.6.0!