netbox-community / netbox-bgp

NetBox plugin for BGP related objects documentation
Apache License 2.0
251 stars 52 forks source link

Plugin installation failed with Netbox v4.0.10 #218

Closed marsteel closed 1 month ago

marsteel commented 1 month ago

NetBox version What version of NetBox are you currently running? 4.0.10 Describe the bug A clear and concise description of what the bug is. The plugin can't be installed by Netbox v4.0.10 To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen. The plugin can be installed by Netbox v4.0.10

Screenshots If applicable, add screenshots to help explain your problem.

Additional context


#28 [main 21/23] RUN /opt/netbox/venv/bin/pip install  --no-warn-script-location -r /opt/netbox/plugin_requirements.txt
#28 0.961 Collecting netbox-plugin-dns (from -r /opt/netbox/plugin_requirements.txt (line 1))
#28 1.020   Downloading netbox_plugin_dns-1.1.3-py3-none-any.whl.metadata (7.1 kB)
#28 1.137 Collecting netbox-bgp (from -r /opt/netbox/plugin_requirements.txt (line 2))
#28 1.227   Downloading netbox_bgp-0.14.0-py3-none-any.whl.metadata (2.0 kB)
#28 1.259 Collecting dnspython (from netbox-plugin-dns->-r /opt/netbox/plugin_requirements.txt (line 1))
#28 1.263   Downloading dnspython-2.7.0-py3-none-any.whl.metadata (5.8 kB)
#28 1.282 Downloading netbox_plugin_dns-1.1.3-py3-none-any.whl (135 kB)
#28 1.429 Downloading netbox_bgp-0.14.0-py3-none-any.whl (57 kB)
#28 1.440 Downloading dnspython-2.7.0-py3-none-any.whl (313 kB)
#28 1.687 Installing collected packages: netbox-bgp, dnspython, netbox-plugin-dns
#28 2.273 Successfully installed dnspython-2.7.0 netbox-bgp-0.14.0 netbox-plugin-dns-1.1.3
#28 DONE 2.8s

#30 [main 23/23] RUN mkdir -p static /opt/unit/state/ /opt/unit/tmp/       && chown -R unit:root /opt/unit/ media reports scripts       && chmod -R g+w /opt/unit/ media reports scripts       && cd /opt/netbox/ && SECRET_KEY="dummyKeyWithMinimumLength-------------------------" /opt/netbox/venv/bin/python -m mkdocs build           --config-file /opt/netbox/mkdocs.yml --site-dir /opt/netbox/netbox/project-static/docs/       && SECRET_KEY="dummyKeyWithMinimumLength-------------------------" /opt/netbox/venv/bin/python /opt/netbox/netbox/manage.py collectstatic --no-input       && mkdir -p /opt/netbox/netbox/media/devicetype-images /opt/netbox/netbox/media/image-attachments       && chown -R unit:root /opt/netbox/netbox/media/devicetype-images /opt/netbox/netbox/media/image-attachments       && chmod -R g+w /opt/netbox/netbox/media       && chmod -R g+w /opt/netbox/netbox/media/devicetype-images       && chmod -R g+w /opt/netbox/netbox/media/image-attachments
#30 0.698 INFO    -  Cleaning site directory
#30 0.699 INFO    -  Building documentation to directory: /opt/netbox/netbox/project-static/docs
#30 0.827 INFO    -  The following pages exist in the docs directory, but are not included in the "nav" configuration:
#30 0.827   - index.md
#30 4.124 Traceback (most recent call last):
#30 4.125   File "<string>", line 1, in <module>
#30 4.125   File "/opt/netbox/venv/lib/python3.11/site-packages/django/__init__.py", line 19, in setup
#30 4.125     configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
#30 4.125                       ^^^^^^^^^^^^^^^^^^^^^^^
#30 4.125   File "/opt/netbox/venv/lib/python3.11/site-packages/django/conf/__init__.py", line 89, in __getattr__
#30 4.126     self._setup(name)
#30 4.126   File "/opt/netbox/venv/lib/python3.11/site-packages/django/conf/__init__.py", line 76, in _setup
#30 4.126     self._wrapped = Settings(settings_module)
#30 4.126                     ^^^^^^^^^^^^^^^^^^^^^^^^^
#30 4.126   File "/opt/netbox/venv/lib/python3.11/site-packages/django/conf/__init__.py", line 190, in __init__
#30 4.126     mod = importlib.import_module(self.SETTINGS_MODULE)
#30 4.126           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#30 4.126   File "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module
#30 4.126     return _bootstrap._gcd_import(name[level:], package, level)
#30 4.126            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#30 4.126   File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
#30 4.126   File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
#30 4.126   File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
#30 4.126   File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
#30 4.127   File "<frozen importlib._bootstrap_external>", line 940, in exec_module
#30 4.127   File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
#30 4.128   File "/opt/netbox/netbox/netbox/settings.py", line 829, in <module>
#30 4.128     plugin_config.validate(PLUGINS_CONFIG[plugin_name], VERSION)
#30 4.128   File "/opt/netbox/netbox/netbox/plugins/__init__.py", line 140, in validate
#30 4.128     raise ImproperlyConfigured(
#30 4.128 django.core.exceptions.ImproperlyConfigured: Plugin netbox_bgp requires NetBox minimum version 4.1.0 (current: 4.0.10).
#30 4.194 ERROR   -  mkdocstrings: Error while loading JSON:
#30 4.194 
#30 4.194 Traceback (most recent call last):
#30 4.194   File "/opt/netbox/venv/lib/python3.11/site-packages/mkdocstrings_handlers/python/handler.py", line 272, in collect
#30 4.194     result = json.loads(stdout)
#30 4.194              ^^^^^^^^^^^^^^^^^^
#30 4.194   File "/usr/lib/python3.11/json/__init__.py", line 346, in loads
#30 4.194     return _default_decoder.decode(s)
#30 4.194            ^^^^^^^^^^^^^^^^^^^^^^^^^^
#30 4.194   File "/usr/lib/python3.11/json/decoder.py", line 337, in decode
#30 4.194     obj, end = self.raw_decode(s, idx=_w(s, 0).end())
#30 4.194                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#30 4.194   File "/usr/lib/python3.11/json/decoder.py", line 355, in raw_decode
#30 4.194     raise JSONDecodeError("Expecting value", s, err.value) from None
#30 4.194 json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
#30 4.194 
#30 4.194 ERROR   -  Error reading page 'plugins/development/dashboard-widgets.md':
#30 4.194 ERROR   -  Could not collect 'extras.dashboard.widgets.DashboardWidget'
#30 4.194 
#30 4.194 Aborted with a BuildError!

My plugin_requirements.txt

netbox-plugin-dns
netbox-bgp
marsteel commented 1 month ago

Or should I specify the plugin version?

netbox-plugin-dns
netbox-bgp==0.13.3
marsteel commented 1 month ago

Or should I specify the plugin version?


netbox-plugin-dns

netbox-bgp==0.13.3

It works.