Open Uzoma8Chi opened 1 month ago
django.core.exceptions.ImproperlyConfigured: Requested setting FIELD_CHOICES, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.
(venv) root@1c82s1na6115:/opt/netbox/netbox/netbox# /opt/netbox/venv/bin/uvicorn netbox-proxbox.netbox_proxbox.main:app --host 0.0.0.0 --port 8800 --app-dir /opt/netbox/netbox --reload
INFO: Will watch for changes in these directories: ['/opt/netbox/netbox/netbox']
INFO: Uvicorn running on http://0.0.0.0:8800 (Press CTRL+C to quit)
INFO: Started reloader process [993] using WatchFiles
🧬 loaded config '/etc/netbox/config/configuration.py'
🧬 loaded config '/etc/netbox/config/configuration.bac.py'
🧬 loaded config '/etc/netbox/config/extra.py'
🧬 loaded config '/etc/netbox/config/logging.py'
🧬 loaded config '/etc/netbox/config/plugins.py'
Process SpawnProcess-1:
Traceback (most recent call last):
File "/usr/lib/python3.12/multiprocessing/process.py", line 314, in _bootstrap
self.run()
File "/usr/lib/python3.12/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "/opt/netbox/venv/lib/python3.12/site-packages/uvicorn-0.32.0-py3.12.egg/uvicorn/_subprocess.py", line 80, in subprocess_started
target(sockets=sockets)
File "/opt/netbox/venv/lib/python3.12/site-packages/uvicorn-0.32.0-py3.12.egg/uvicorn/server.py", line 65, in run
return asyncio.run(self.serve(sockets=sockets))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/asyncio/runners.py", line 194, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "uvloop/loop.pyx", line 1518, in uvloop.loop.Loop.run_until_complete
File "/opt/netbox/venv/lib/python3.12/site-packages/uvicorn-0.32.0-py3.12.egg/uvicorn/server.py", line 69, in serve
await self._serve(sockets)
File "/opt/netbox/venv/lib/python3.12/site-packages/uvicorn-0.32.0-py3.12.egg/uvicorn/server.py", line 76, in _serve
config.load()
File "/opt/netbox/venv/lib/python3.12/site-packages/uvicorn-0.32.0-py3.12.egg/uvicorn/config.py", line 434, in load
self.loaded_app = import_from_string(self.app)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/netbox/venv/lib/python3.12/site-packages/uvicorn-0.32.0-py3.12.egg/uvicorn/importer.py", line 19, in import_from_string
module = importlib.import_module(module_str)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/importlib/__init__.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 995, in exec_module
File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
File "/opt/netbox/netbox/netbox-proxbox/netbox_proxbox/main.py", line 7, in <module>
from netbox_proxbox.backend.exception import ProxboxException
File "/opt/netbox/venv/lib/python3.12/site-packages/netbox_proxbox/backend/__init__.py", line 1, in <module>
from netbox_proxbox.backend.routes.netbox.virtualization.cluster_type import ClusterType
File "/opt/netbox/venv/lib/python3.12/site-packages/netbox_proxbox/backend/routes/netbox/__init__.py", line 6, in <module>
from netbox_proxbox.backend.session.netbox import NetboxSessionDep
File "/opt/netbox/venv/lib/python3.12/site-packages/netbox_proxbox/backend/session/netbox.py", line 14, in <module>
from netbox.settings import BASE_PATH
File "/opt/netbox/netbox/netbox/settings.py", line 799, in <module>
plugin = importlib.import_module(plugin_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/importlib/__init__.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/netbox/venv/lib/python3.12/site-packages/netbox_dns/__init__.py", line 5, in <module>
from ipam.choices import IPAddressStatusChoices
File "/opt/netbox/netbox/ipam/choices.py", line 21, in <module>
class PrefixStatusChoices(ChoiceSet):
File "/opt/netbox/netbox/utilities/choices.py", line 24, in __new__
if replace_key and replace_key in settings.FIELD_CHOICES:
^^^^^^^^^^^^^^^^^^^^^^
File "/opt/netbox/venv/lib/python3.12/site-packages/django/conf/__init__.py", line 89, in __getattr__
self._setup(name)
File "/opt/netbox/venv/lib/python3.12/site-packages/django/conf/__init__.py", line 69, in _setup
raise ImproperlyConfigured(
django.core.exceptions.ImproperlyConfigured: Requested setting FIELD_CHOICES, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.
^CINFO: Stopping reloader process [993]
Hi,
so far I can not setup Proxbox backend. If anyone found some workaround please let me know. I am thinking about creating a new docker instance with Proxbox backend only. What do you think? I would need some help for this.
176