Module "netbox_topology_views.urls" does not define a "urlpatterns" attribute/class #364
Answered
by
mattieserver
SirDoofenheinz
asked this question in
Q&A
Replies: 1 comment 2 replies
-
Are you sure you are on the 3.5.7 version of netbox? The latest beta of netbox makes changes to the admin interface and I see references to that in the error message.
…________________________________
From: SirDoofenheinz ***@***.***>
Sent: Monday, August 14, 2023 3:03:38 PM
To: mattieserver/netbox-topology-views ***@***.***>
Cc: Subscribed ***@***.***>
Subject: [mattieserver/netbox-topology-views] Module "netbox_topology_views.urls" does not define a "urlpatterns" attribute/class (Discussion #364)
Hi all,
I get an error when installing netbox_topoly_views.
I don't know where I did something wrong. I've already re-run the Netbox upgrade script several times and looked for missing depencies.
[v3.6.2]netbox-topology-views
[v3.5.7] netbox
Traceback (most recent call last):
File "/opt/netbox-3.6-beta1/venv/lib/python3.10/site-packages/django/utils/module_loading.py", line 30, in import_string
return cached_import(module_path, class_name)
File "/opt/netbox-3.6-beta1/venv/lib/python3.10/site-packages/django/utils/module_loading.py", line 15, in cached_import
module = import_module(module_path)
File "/usr/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "/opt/netbox-3.6-beta1/venv/lib/python3.10/site-packages/netbox_topology_views/urls.py", line 4, in
from . import models, views
File "/opt/netbox-3.6-beta1/venv/lib/python3.10/site-packages/netbox_topology_views/views.py", line 42, in
from netbox_topology_views.filters import DeviceFilterSet, CoordinatesFilterSet
File "/opt/netbox-3.6-beta1/venv/lib/python3.10/site-packages/netbox_topology_views/filters.py", line 10, in
class DeviceFilterSet(TenancyFilterSet, NetBoxModelFilterSet):
File "/opt/netbox-3.6-beta1/venv/lib/python3.10/site-packages/django_filters/filterset.py", line 62, in new
new_class.base_filters = new_class.get_filters()
File "/opt/netbox-3.6-beta1/netbox/netbox/filtersets.py", line 222, in get_filters
additional_filters.update(cls.get_additional_lookups(existing_filter_name, existing_filter))
File "/opt/netbox-3.6-beta1/netbox/netbox/filtersets.py", line 179, in get_additional_lookups
resolve_field(field, lookup_expr) # Will raise FieldLookupError if the lookup is invalid
File "/opt/netbox-3.6-beta1/venv/lib/python3.10/site-packages/django_filters/utils.py", line 204, in resolve_field
query = model_field.model._default_manager.all().query
AttributeError: 'NoneType' object has no attribute 'model'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/netbox-3.6-beta1/netbox/manage.py", line 10, in
execute_from_command_line(sys.argv)
File "/opt/netbox-3.6-beta1/venv/lib/python3.10/site-packages/django/core/management/init.py", line 442, in execute_from_command_line
utility.execute()
File "/opt/netbox-3.6-beta1/venv/lib/python3.10/site-packages/django/core/management/init.py", line 436, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/opt/netbox-3.6-beta1/venv/lib/python3.10/site-packages/django/core/management/base.py", line 412, in run_from_argv
self.execute(*args, **cmd_options)
File "/opt/netbox-3.6-beta1/venv/lib/python3.10/site-packages/django/core/management/base.py", line 458, in execute
output = self.handle(*args, **options)
File "/opt/netbox-3.6-beta1/venv/lib/python3.10/site-packages/django/core/management/base.py", line 106, in wrapper
res = handle_func(*args, **kwargs)
File "/opt/netbox-3.6-beta1/venv/lib/python3.10/site-packages/django/core/management/commands/migrate.py", line 100, in handle
self.check(databases=[database])
File "/opt/netbox-3.6-beta1/venv/lib/python3.10/site-packages/django/core/management/base.py", line 485, in check
all_issues = checks.run_checks(
File "/opt/netbox-3.6-beta1/venv/lib/python3.10/site-packages/django/core/checks/registry.py", line 88, in run_checks
new_errors = check(app_configs=app_configs, databases=databases)
File "/opt/netbox-3.6-beta1/venv/lib/python3.10/site-packages/django/core/checks/urls.py", line 14, in check_url_config
return check_resolver(resolver)
File "/opt/netbox-3.6-beta1/venv/lib/python3.10/site-packages/django/core/checks/urls.py", line 24, in check_resolver
return check_method()
File "/opt/netbox-3.6-beta1/venv/lib/python3.10/site-packages/django/urls/resolvers.py", line 494, in check
for pattern in self.url_patterns:
File "/opt/netbox-3.6-beta1/venv/lib/python3.10/site-packages/django/utils/functional.py", line 57, in get
res = instance.dict[self.name] = self.func(instance)
File "/opt/netbox-3.6-beta1/venv/lib/python3.10/site-packages/django/urls/resolvers.py", line 715, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/opt/netbox-3.6-beta1/venv/lib/python3.10/site-packages/django/utils/functional.py", line 57, in get
res = instance.dict[self.name] = self.func(instance)
File "/opt/netbox-3.6-beta1/venv/lib/python3.10/site-packages/django/urls/resolvers.py", line 708, in urlconf_module
return import_module(self.urlconf_name)
File "/usr/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "/opt/netbox-3.6-beta1/netbox/netbox/urls.py", line 9, in
from extras.plugins.urls import plugin_admin_patterns, plugin_patterns, plugin_api_patterns
File "/opt/netbox-3.6-beta1/netbox/extras/plugins/urls.py", line 31, in
urlpatterns = import_string(f"{plugin_path}.urls.urlpatterns")
File "/opt/netbox-3.6-beta1/venv/lib/python3.10/site-packages/django/utils/module_loading.py", line 32, in import_string
raise ImportError(
ImportError: Module "netbox_topology_views.urls" does not define a "urlpatterns" attribute/class
If I have missed some Information please ask.
Thank you
—
Reply to this email directly, view it on GitHub<#364>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAXITDCQY7NH3Z73CGLAFH3XVIO2VANCNFSM6AAAAAA3PVH55E>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
SirDoofenheinz
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
I get an error when installing netbox_topoly_views.
I don't know where I did something wrong. I've already re-run the Netbox upgrade script several times and looked for missing depencies.
[v3.6.2]netbox-topology-views
[v3.5.7] netbox
Traceback (most recent call last):
File "/opt/netbox-3.6-beta1/venv/lib/python3.10/site-packages/django/utils/module_loading.py", line 30, in import_string
return cached_import(module_path, class_name)
File "/opt/netbox-3.6-beta1/venv/lib/python3.10/site-packages/django/utils/module_loading.py", line 15, in cached_import
module = import_module(module_path)
File "/usr/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "/opt/netbox-3.6-beta1/venv/lib/python3.10/site-packages/netbox_topology_views/urls.py", line 4, in
from . import models, views
File "/opt/netbox-3.6-beta1/venv/lib/python3.10/site-packages/netbox_topology_views/views.py", line 42, in
from netbox_topology_views.filters import DeviceFilterSet, CoordinatesFilterSet
File "/opt/netbox-3.6-beta1/venv/lib/python3.10/site-packages/netbox_topology_views/filters.py", line 10, in
class DeviceFilterSet(TenancyFilterSet, NetBoxModelFilterSet):
File "/opt/netbox-3.6-beta1/venv/lib/python3.10/site-packages/django_filters/filterset.py", line 62, in new
new_class.base_filters = new_class.get_filters()
File "/opt/netbox-3.6-beta1/netbox/netbox/filtersets.py", line 222, in get_filters
additional_filters.update(cls.get_additional_lookups(existing_filter_name, existing_filter))
File "/opt/netbox-3.6-beta1/netbox/netbox/filtersets.py", line 179, in get_additional_lookups
resolve_field(field, lookup_expr) # Will raise FieldLookupError if the lookup is invalid
File "/opt/netbox-3.6-beta1/venv/lib/python3.10/site-packages/django_filters/utils.py", line 204, in resolve_field
query = model_field.model._default_manager.all().query
AttributeError: 'NoneType' object has no attribute 'model'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/netbox-3.6-beta1/netbox/manage.py", line 10, in
execute_from_command_line(sys.argv)
File "/opt/netbox-3.6-beta1/venv/lib/python3.10/site-packages/django/core/management/init.py", line 442, in execute_from_command_line
utility.execute()
File "/opt/netbox-3.6-beta1/venv/lib/python3.10/site-packages/django/core/management/init.py", line 436, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/opt/netbox-3.6-beta1/venv/lib/python3.10/site-packages/django/core/management/base.py", line 412, in run_from_argv
self.execute(*args, **cmd_options)
File "/opt/netbox-3.6-beta1/venv/lib/python3.10/site-packages/django/core/management/base.py", line 458, in execute
output = self.handle(*args, **options)
File "/opt/netbox-3.6-beta1/venv/lib/python3.10/site-packages/django/core/management/base.py", line 106, in wrapper
res = handle_func(*args, **kwargs)
File "/opt/netbox-3.6-beta1/venv/lib/python3.10/site-packages/django/core/management/commands/migrate.py", line 100, in handle
self.check(databases=[database])
File "/opt/netbox-3.6-beta1/venv/lib/python3.10/site-packages/django/core/management/base.py", line 485, in check
all_issues = checks.run_checks(
File "/opt/netbox-3.6-beta1/venv/lib/python3.10/site-packages/django/core/checks/registry.py", line 88, in run_checks
new_errors = check(app_configs=app_configs, databases=databases)
File "/opt/netbox-3.6-beta1/venv/lib/python3.10/site-packages/django/core/checks/urls.py", line 14, in check_url_config
return check_resolver(resolver)
File "/opt/netbox-3.6-beta1/venv/lib/python3.10/site-packages/django/core/checks/urls.py", line 24, in check_resolver
return check_method()
File "/opt/netbox-3.6-beta1/venv/lib/python3.10/site-packages/django/urls/resolvers.py", line 494, in check
for pattern in self.url_patterns:
File "/opt/netbox-3.6-beta1/venv/lib/python3.10/site-packages/django/utils/functional.py", line 57, in get
res = instance.dict[self.name] = self.func(instance)
File "/opt/netbox-3.6-beta1/venv/lib/python3.10/site-packages/django/urls/resolvers.py", line 715, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/opt/netbox-3.6-beta1/venv/lib/python3.10/site-packages/django/utils/functional.py", line 57, in get
res = instance.dict[self.name] = self.func(instance)
File "/opt/netbox-3.6-beta1/venv/lib/python3.10/site-packages/django/urls/resolvers.py", line 708, in urlconf_module
return import_module(self.urlconf_name)
File "/usr/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "/opt/netbox-3.6-beta1/netbox/netbox/urls.py", line 9, in
from extras.plugins.urls import plugin_admin_patterns, plugin_patterns, plugin_api_patterns
File "/opt/netbox-3.6-beta1/netbox/extras/plugins/urls.py", line 31, in
urlpatterns = import_string(f"{plugin_path}.urls.urlpatterns")
File "/opt/netbox-3.6-beta1/venv/lib/python3.10/site-packages/django/utils/module_loading.py", line 32, in import_string
raise ImportError(
ImportError: Module "netbox_topology_views.urls" does not define a "urlpatterns" attribute/class
If I have missed some Information please ask.
Thank you
Beta Was this translation helpful? Give feedback.
All reactions