netbox-plugin-dns: AttributeError: module 'netbox_dns' has no attribute 'config'
Versions NetBox Version: 3.6.4 NetBox DNS Version: 0.21.3 (latest) Python Version: 3.9.18
Describe the bug When I run the migrate script I get this error:
(venv) [root@netbox netbox]# ./manage.py migrate
Traceback (most recent call last):
File "/opt/netbox-3.6.4/netbox/netbox/settings.py", line 749, in <module>
plugin_config: PluginConfig = plugin.config
AttributeError: module 'netbox_dns' has no attribute 'config'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/netbox-3.6.4/netbox/./manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/opt/netbox-3.6.4/venv/lib64/python3.9/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
utility.execute()
File "/opt/netbox-3.6.4/venv/lib64/python3.9/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.4/venv/lib64/python3.9/site-packages/django/core/management/base.py", line 412, in run_from_argv
self.execute(*args, **cmd_options)
File "/opt/netbox-3.6.4/venv/lib64/python3.9/site-packages/django/core/management/base.py", line 458, in execute
output = self.handle(*args, **options)
File "/opt/netbox-3.6.4/venv/lib64/python3.9/site-packages/django/core/management/base.py", line 103, in wrapper
saved_locale = translation.get_language()
File "/opt/netbox-3.6.4/venv/lib64/python3.9/site-packages/django/utils/translation/__init__.py", line 210, in get_language
return _trans.get_language()
File "/opt/netbox-3.6.4/venv/lib64/python3.9/site-packages/django/utils/translation/__init__.py", line 65, in __getattr__
if settings.USE_I18N:
File "/opt/netbox-3.6.4/venv/lib64/python3.9/site-packages/django/conf/__init__.py", line 102, in __getattr__
self._setup(name)
File "/opt/netbox-3.6.4/venv/lib64/python3.9/site-packages/django/conf/__init__.py", line 89, in _setup
self._wrapped = Settings(settings_module)
File "/opt/netbox-3.6.4/venv/lib64/python3.9/site-packages/django/conf/__init__.py", line 217, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/usr/lib64/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 850, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/opt/netbox-3.6.4/netbox/netbox/settings.py", line 751, in <module>
raise ImproperlyConfigured(
django.core.exceptions.ImproperlyConfigured: Plugin netbox_dns does not provide a 'config' variable. This should be defined in the plugin's __init__.py file and point to the PluginConfig subclass.
To Reproduce Follow installation procedure.
Expected result Expect it to work.
Actual result Netbox doesn’t load unless I remove the plugin from the list
About this issue
- Original URL
- State: closed
- Created 7 months ago
- Comments: 16 (10 by maintainers)
You were correct @peteeckel ! I indeed had some folders not owned by user “netbox”. Changing ownership wasn’t sufficient though, I also had to uninstall the plugin and reinstall it.
Once I did that, migration worked.
Thank you for your responsiveness! And for the excellent job too!