-
Notifications
You must be signed in to change notification settings - Fork 86
Closed
Labels
type: bugA confirmed report of unexpected behavior in the applicationA confirmed report of unexpected behavior in the application
Description
NetBox version
v4.2.3-Docker-3.2.0
Topology Views version
v4.2.0
Steps to Reproduce
With the new way of versioning docker Netbox, I can't install the plugin.
This was old style, which works well:
v4.2.2
But there is new one:
v4.2.3-Docker-3.2.0
This produce error on installation:
#15 [netbox 11/11] RUN /opt/netbox/venv/bin/python /opt/netbox/netbox/manage.py collectstatic --no-input
#15 4.634 🧬 loaded config '/etc/netbox/config/configuration.py'
#15 4.634 🧬 loaded config '/etc/netbox/config/extra.py'
#15 4.634 🧬 loaded config '/etc/netbox/config/logging.py'
#15 4.634 🧬 loaded config '/etc/netbox/config/plugins.py'
#15 4.634 Traceback (most recent call last):
#15 4.634 File "/opt/netbox/netbox/manage.py", line 10, in <module>
#15 4.634 execute_from_command_line(sys.argv)
#15 4.635 File "/opt/netbox/venv/lib/python3.12/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
#15 4.636 utility.execute()
#15 4.636 File "/opt/netbox/venv/lib/python3.12/site-packages/django/core/management/__init__.py", line 416, in execute
#15 4.636 django.setup()
#15 4.636 File "/opt/netbox/venv/lib/python3.12/site-packages/django/__init__.py", line 24, in setup
#15 4.636 apps.populate(settings.INSTALLED_APPS)
#15 4.636 File "/opt/netbox/venv/lib/python3.12/site-packages/django/apps/registry.py", line 124, in populate
#15 4.636 app_config.ready()
#15 4.636 File "/opt/netbox/venv/lib/python3.12/site-packages/netbox_topology_views/__init__.py", line 22, in ready
#15 4.637 super().ready()
#15 4.638 File "/opt/netbox/netbox/netbox/plugins/__init__.py", line 116, in ready
#15 4.638 if template_extensions := self._load_resource('template_extensions'):
#15 4.638 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#15 4.638 File "/opt/netbox/netbox/netbox/plugins/__init__.py", line 92, in _load_resource
#15 4.638 module = import_module(default_module)
#15 4.638 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#15 4.638 File "/usr/lib/python3.12/importlib/__init__.py", line 90, in import_module
#15 4.638 return _bootstrap._gcd_import(name[level:], package, level)
#15 4.638 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#15 4.639 File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
#15 4.639 File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
#15 4.639 File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
#15 4.639 File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
#15 4.639 File "<frozen importlib._bootstrap_external>", line 995, in exec_module
#15 4.639 File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
#15 4.639 File "/opt/netbox/venv/lib/python3.12/site-packages/netbox_topology_views/template_content.py", line 6, in <module>
#15 4.640 NETBOX_CURRENT_VERSION = version.parse(settings.VERSION)
#15 4.640 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#15 4.640 File "/opt/netbox/venv/lib/python3.12/site-packages/packaging/version.py", line 56, in parse
#15 4.640 return Version(version)
#15 4.640 ^^^^^^^^^^^^^^^^
#15 4.640 File "/opt/netbox/venv/lib/python3.12/site-packages/packaging/version.py", line 202, in __init__
#15 4.640 raise InvalidVersion(f"Invalid version: {version!r}")
#15 4.640 packaging.version.InvalidVersion: Invalid version: '4.2.3-Docker-3.2.0'
#15 ERROR: process "/bin/sh -c /opt/netbox/venv/bin/python /opt/netbox/netbox/manage.py collectstatic --no-input" did not complete successfully: exit code: 1
------
> [netbox 11/11] RUN /opt/netbox/venv/bin/python /opt/netbox/netbox/manage.py collectstatic --no-input:
4.639 File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
4.639 File "/opt/netbox/venv/lib/python3.12/site-packages/netbox_topology_views/template_content.py", line 6, in <module>
4.640 NETBOX_CURRENT_VERSION = version.parse(settings.VERSION)
4.640 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4.640 File "/opt/netbox/venv/lib/python3.12/site-packages/packaging/version.py", line 56, in parse
4.640 return Version(version)
4.640 ^^^^^^^^^^^^^^^^
4.640 File "/opt/netbox/venv/lib/python3.12/site-packages/packaging/version.py", line 202, in __init__
4.640 raise InvalidVersion(f"Invalid version: {version!r}")
4.640 packaging.version.InvalidVersion: Invalid version: '4.2.3-Docker-3.2.0'
------
failed to solve: process "/bin/sh -c /opt/netbox/venv/bin/python /opt/netbox/netbox/manage.py collectstatic --no-input" did not complete successfully: exit code: 1
Expected Behavior
use proper version. It can be better to use settings.RELEASE.version
>>> settings.RELEASE.version
'4.2.3'
Observed Behavior
Cannot install plugin
Ben0it, thost96, pascaliske, willseward, holtgrewe and 15 more
Metadata
Metadata
Assignees
Labels
type: bugA confirmed report of unexpected behavior in the applicationA confirmed report of unexpected behavior in the application