Type StrFilterLookup is defined multiple times in the schema #113

Closed
opened 2026-04-05 16:21:47 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @okoelbl on 3/19/2026

NetBox Edition

NetBox Community

NetBox Version

v4.5.5

Python Version

3.12

Steps to Reproduce

  • Upgrade netbox-docker to 4.0.2 and netbox to v4.5.5
  • Watch docker logs of netbox container

Expected Behavior

netbox container should start and get healthy

Observed Behavior

netbox container is in a restart loop throwing the following error (full trace):

netbox-1       | /opt/netbox/venv/lib/python3.12/site-packages/netbox_secrets/graphql/filters.py:40: UserWarning: FilterLookup[str] may cause DuplicatedTypeName errors. Use StrFilterLookup instead.
netbox-1       |   name: FilterLookup[str] | None = strawberry_django.filter_field()
netbox-1       | 🧬 loaded config '/etc/netbox/config/configuration.py'
netbox-1       | 🧬 loaded config '/etc/netbox/config/extra.py'
netbox-1       | 🧬 loaded config '/etc/netbox/config/local_config.py'
netbox-1       | 🧬 loaded config '/etc/netbox/config/logging.py'
netbox-1       | 🧬 loaded config '/etc/netbox/config/plugins.py'
netbox-1       | Traceback (most recent call last):
netbox-1       |   File "/opt/netbox/netbox/./manage.py", line 10, in <module>
netbox-1       |     execute_from_command_line(sys.argv)
netbox-1       |   File "/opt/netbox/venv/lib/python3.12/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
netbox-1       |     utility.execute()
netbox-1       |   File "/opt/netbox/venv/lib/python3.12/site-packages/django/core/management/__init__.py", line 436, in execute
netbox-1       |     self.fetch_command(subcommand).run_from_argv(self.argv)
netbox-1       |   File "/opt/netbox/venv/lib/python3.12/site-packages/django/core/management/base.py", line 420, in run_from_argv
netbox-1       |     self.execute(*args, **cmd_options)
netbox-1       |   File "/opt/netbox/venv/lib/python3.12/site-packages/django/core/management/base.py", line 461, in execute
netbox-1       |     self.check(**check_kwargs)
netbox-1       |   File "/opt/netbox/venv/lib/python3.12/site-packages/django/core/management/base.py", line 496, in check
netbox-1       |     all_issues = checks.run_checks(
netbox-1       |                  ^^^^^^^^^^^^^^^^^^
netbox-1       |   File "/opt/netbox/venv/lib/python3.12/site-packages/django/core/checks/registry.py", line 89, in run_checks
netbox-1       |     new_errors = check(app_configs=app_configs, databases=databases)
netbox-1       |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
netbox-1       |   File "/opt/netbox/venv/lib/python3.12/site-packages/django/core/checks/urls.py", line 44, in check_url_namespaces_unique
netbox-1       |     all_namespaces = _load_all_namespaces(resolver)
netbox-1       |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
netbox-1       |   File "/opt/netbox/venv/lib/python3.12/site-packages/django/core/checks/urls.py", line 63, in _load_all_namespaces
netbox-1       |     url_patterns = getattr(resolver, "url_patterns", [])
netbox-1       |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
netbox-1       |   File "/opt/netbox/venv/lib/python3.12/site-packages/django/utils/functional.py", line 47, in __get__
netbox-1       |     res = instance.__dict__[self.name] = self.func(instance)
netbox-1       |                                          ^^^^^^^^^^^^^^^^^^^
netbox-1       |   File "/opt/netbox/venv/lib/python3.12/site-packages/django/urls/resolvers.py", line 718, in url_patterns
netbox-1       |     patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
netbox-1       |                        ^^^^^^^^^^^^^^^^^^^
netbox-1       |   File "/opt/netbox/venv/lib/python3.12/site-packages/django/utils/functional.py", line 47, in __get__
netbox-1       |     res = instance.__dict__[self.name] = self.func(instance)
netbox-1       |                                          ^^^^^^^^^^^^^^^^^^^
netbox-1       |   File "/opt/netbox/venv/lib/python3.12/site-packages/django/urls/resolvers.py", line 711, in urlconf_module
netbox-1       |     return import_module(self.urlconf_name)
netbox-1       |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
netbox-1       |   File "/usr/lib/python3.12/importlib/__init__.py", line 90, in import_module
netbox-1       |     return _bootstrap._gcd_import(name[level:], package, level)
netbox-1       |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
netbox-1       |   File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
netbox-1       |   File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
netbox-1       |   File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
netbox-1       |   File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
netbox-1       |   File "<frozen importlib._bootstrap_external>", line 995, in exec_module
netbox-1       |   File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
netbox-1       |   File "/opt/netbox/netbox/netbox/urls.py", line 9, in <module>
netbox-1       |     from netbox.graphql.schema import schema
netbox-1       |   File "/opt/netbox/netbox/netbox/graphql/schema.py", line 37, in <module>
netbox-1       |     schema = strawberry.Schema(
netbox-1       |              ^^^^^^^^^^^^^^^^^^
netbox-1       |   File "/opt/netbox/venv/lib/python3.12/site-packages/strawberry/schema/schema.py", line 353, in __init__
netbox-1       |     raise error.__cause__ from None
netbox-1       |   File "/opt/netbox/venv/lib/python3.12/site-packages/graphql/type/definition.py", line 1495, in fields
netbox-1       |     fields = resolve_thunk(self._fields)
netbox-1       |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^
netbox-1       |   File "/opt/netbox/venv/lib/python3.12/site-packages/graphql/type/definition.py", line 318, in resolve_thunk
netbox-1       |     return thunk() if callable(thunk) else thunk
netbox-1       |            ^^^^^^^
netbox-1       |   File "/opt/netbox/venv/lib/python3.12/site-packages/strawberry/schema/schema_converter.py", line 531, in <lambda>
netbox-1       |     fields=lambda: self.get_graphql_input_fields(type_definition),
netbox-1       |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
netbox-1       |   File "/opt/netbox/venv/lib/python3.12/site-packages/strawberry/schema/schema_converter.py", line 488, in get_graphql_input_fields
netbox-1       |     return _get_thunk_mapping(
netbox-1       |            ^^^^^^^^^^^^^^^^^^^
netbox-1       |   File "/opt/netbox/venv/lib/python3.12/site-packages/strawberry/schema/schema_converter.py", line 143, in _get_thunk_mapping
netbox-1       |     thunk_mapping[name_converter(field)] = field_converter(
netbox-1       |                                            ^^^^^^^^^^^^^^^^
netbox-1       |   File "/opt/netbox/venv/lib/python3.12/site-packages/strawberry/schema/schema_converter.py", line 453, in from_input_field
netbox-1       |     self.from_maybe_optional(
netbox-1       |   File "/opt/netbox/venv/lib/python3.12/site-packages/strawberry/schema/schema_converter.py", line 866, in from_maybe_optional
netbox-1       |     return self.from_type(type_.of_type)
netbox-1       |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
netbox-1       |   File "/opt/netbox/venv/lib/python3.12/site-packages/strawberry/schema/schema_converter.py", line 876, in from_type
netbox-1       |     return self.from_input_object(type_)
netbox-1       |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
netbox-1       |   File "/opt/netbox/venv/lib/python3.12/site-packages/strawberry/schema/schema_converter.py", line 503, in from_input_object
netbox-1       |     self.validate_same_type_definition(type_name, type_definition, cached_type)
netbox-1       |   File "/opt/netbox/venv/lib/python3.12/site-packages/strawberry/schema/schema_converter.py", line 1040, in validate_same_type_definition
netbox-1       |     raise DuplicatedTypeName(first_origin, second_origin, name)
netbox-1       | strawberry.exceptions.duplicated_type_name.DuplicatedTypeName: Type StrFilterLookup is defined multiple times in the schema
netbox-1       | ⏳ Waiting on DB... (12s / 30s)
*Originally created by @okoelbl on 3/19/2026* ### NetBox Edition NetBox Community ### NetBox Version v4.5.5 ### Python Version 3.12 ### Steps to Reproduce - Upgrade `netbox-docker` to 4.0.2 and `netbox` to v4.5.5 - Watch docker logs of `netbox` container ### Expected Behavior `netbox` container should start and get healthy ### Observed Behavior netbox container is in a restart loop throwing the following error (full trace): ``` netbox-1 | /opt/netbox/venv/lib/python3.12/site-packages/netbox_secrets/graphql/filters.py:40: UserWarning: FilterLookup[str] may cause DuplicatedTypeName errors. Use StrFilterLookup instead. netbox-1 | name: FilterLookup[str] | None = strawberry_django.filter_field() netbox-1 | 🧬 loaded config '/etc/netbox/config/configuration.py' netbox-1 | 🧬 loaded config '/etc/netbox/config/extra.py' netbox-1 | 🧬 loaded config '/etc/netbox/config/local_config.py' netbox-1 | 🧬 loaded config '/etc/netbox/config/logging.py' netbox-1 | 🧬 loaded config '/etc/netbox/config/plugins.py' netbox-1 | Traceback (most recent call last): netbox-1 | File "/opt/netbox/netbox/./manage.py", line 10, in <module> netbox-1 | execute_from_command_line(sys.argv) netbox-1 | File "/opt/netbox/venv/lib/python3.12/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line netbox-1 | utility.execute() netbox-1 | File "/opt/netbox/venv/lib/python3.12/site-packages/django/core/management/__init__.py", line 436, in execute netbox-1 | self.fetch_command(subcommand).run_from_argv(self.argv) netbox-1 | File "/opt/netbox/venv/lib/python3.12/site-packages/django/core/management/base.py", line 420, in run_from_argv netbox-1 | self.execute(*args, **cmd_options) netbox-1 | File "/opt/netbox/venv/lib/python3.12/site-packages/django/core/management/base.py", line 461, in execute netbox-1 | self.check(**check_kwargs) netbox-1 | File "/opt/netbox/venv/lib/python3.12/site-packages/django/core/management/base.py", line 496, in check netbox-1 | all_issues = checks.run_checks( netbox-1 | ^^^^^^^^^^^^^^^^^^ netbox-1 | File "/opt/netbox/venv/lib/python3.12/site-packages/django/core/checks/registry.py", line 89, in run_checks netbox-1 | new_errors = check(app_configs=app_configs, databases=databases) netbox-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ netbox-1 | File "/opt/netbox/venv/lib/python3.12/site-packages/django/core/checks/urls.py", line 44, in check_url_namespaces_unique netbox-1 | all_namespaces = _load_all_namespaces(resolver) netbox-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ netbox-1 | File "/opt/netbox/venv/lib/python3.12/site-packages/django/core/checks/urls.py", line 63, in _load_all_namespaces netbox-1 | url_patterns = getattr(resolver, "url_patterns", []) netbox-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ netbox-1 | File "/opt/netbox/venv/lib/python3.12/site-packages/django/utils/functional.py", line 47, in __get__ netbox-1 | res = instance.__dict__[self.name] = self.func(instance) netbox-1 | ^^^^^^^^^^^^^^^^^^^ netbox-1 | File "/opt/netbox/venv/lib/python3.12/site-packages/django/urls/resolvers.py", line 718, in url_patterns netbox-1 | patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) netbox-1 | ^^^^^^^^^^^^^^^^^^^ netbox-1 | File "/opt/netbox/venv/lib/python3.12/site-packages/django/utils/functional.py", line 47, in __get__ netbox-1 | res = instance.__dict__[self.name] = self.func(instance) netbox-1 | ^^^^^^^^^^^^^^^^^^^ netbox-1 | File "/opt/netbox/venv/lib/python3.12/site-packages/django/urls/resolvers.py", line 711, in urlconf_module netbox-1 | return import_module(self.urlconf_name) netbox-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ netbox-1 | File "/usr/lib/python3.12/importlib/__init__.py", line 90, in import_module netbox-1 | return _bootstrap._gcd_import(name[level:], package, level) netbox-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ netbox-1 | File "<frozen importlib._bootstrap>", line 1387, in _gcd_import netbox-1 | File "<frozen importlib._bootstrap>", line 1360, in _find_and_load netbox-1 | File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked netbox-1 | File "<frozen importlib._bootstrap>", line 935, in _load_unlocked netbox-1 | File "<frozen importlib._bootstrap_external>", line 995, in exec_module netbox-1 | File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed netbox-1 | File "/opt/netbox/netbox/netbox/urls.py", line 9, in <module> netbox-1 | from netbox.graphql.schema import schema netbox-1 | File "/opt/netbox/netbox/netbox/graphql/schema.py", line 37, in <module> netbox-1 | schema = strawberry.Schema( netbox-1 | ^^^^^^^^^^^^^^^^^^ netbox-1 | File "/opt/netbox/venv/lib/python3.12/site-packages/strawberry/schema/schema.py", line 353, in __init__ netbox-1 | raise error.__cause__ from None netbox-1 | File "/opt/netbox/venv/lib/python3.12/site-packages/graphql/type/definition.py", line 1495, in fields netbox-1 | fields = resolve_thunk(self._fields) netbox-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ netbox-1 | File "/opt/netbox/venv/lib/python3.12/site-packages/graphql/type/definition.py", line 318, in resolve_thunk netbox-1 | return thunk() if callable(thunk) else thunk netbox-1 | ^^^^^^^ netbox-1 | File "/opt/netbox/venv/lib/python3.12/site-packages/strawberry/schema/schema_converter.py", line 531, in <lambda> netbox-1 | fields=lambda: self.get_graphql_input_fields(type_definition), netbox-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ netbox-1 | File "/opt/netbox/venv/lib/python3.12/site-packages/strawberry/schema/schema_converter.py", line 488, in get_graphql_input_fields netbox-1 | return _get_thunk_mapping( netbox-1 | ^^^^^^^^^^^^^^^^^^^ netbox-1 | File "/opt/netbox/venv/lib/python3.12/site-packages/strawberry/schema/schema_converter.py", line 143, in _get_thunk_mapping netbox-1 | thunk_mapping[name_converter(field)] = field_converter( netbox-1 | ^^^^^^^^^^^^^^^^ netbox-1 | File "/opt/netbox/venv/lib/python3.12/site-packages/strawberry/schema/schema_converter.py", line 453, in from_input_field netbox-1 | self.from_maybe_optional( netbox-1 | File "/opt/netbox/venv/lib/python3.12/site-packages/strawberry/schema/schema_converter.py", line 866, in from_maybe_optional netbox-1 | return self.from_type(type_.of_type) netbox-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ netbox-1 | File "/opt/netbox/venv/lib/python3.12/site-packages/strawberry/schema/schema_converter.py", line 876, in from_type netbox-1 | return self.from_input_object(type_) netbox-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ netbox-1 | File "/opt/netbox/venv/lib/python3.12/site-packages/strawberry/schema/schema_converter.py", line 503, in from_input_object netbox-1 | self.validate_same_type_definition(type_name, type_definition, cached_type) netbox-1 | File "/opt/netbox/venv/lib/python3.12/site-packages/strawberry/schema/schema_converter.py", line 1040, in validate_same_type_definition netbox-1 | raise DuplicatedTypeName(first_origin, second_origin, name) netbox-1 | strawberry.exceptions.duplicated_type_name.DuplicatedTypeName: Type StrFilterLookup is defined multiple times in the schema netbox-1 | ⏳ Waiting on DB... (12s / 30s) ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/netbox#113