-
Notifications
You must be signed in to change notification settings - Fork 51
Open
Description
Hi,
I’m encountering an issue while following the NetBox plugin tutorial and trying to load a simple custom plugin (netbox-map).
The plugin appears to be correctly installed in the NetBox virtual environment:
(venv) root@netbox:~/netbox-plugin# pip3 show netbox-map
Name: netbox-map
Version: 0.1
Summary: A NetBox plugin to add a map
Location: /opt/netbox/venv/lib/python3.13/site-packages
Editable project location: /root/netbox-pluginHowever, when starting NetBox with:
python3 /opt/netbox/netbox/manage.py runserverI receive the following error:
django.core.exceptions.ImproperlyConfigured:
Unable to import plugin netbox_map: Module not found.
Check that the plugin module has been installed within the correct Python environment.
Plugin configuration
The plugin structure and configuration follow the official tutorial:
https://github.com/netbox-community/netbox-plugin-tutorial/blob/main/tutorial/step01-initial-setup.md
netbox_map/__init__.py
from netbox.plugins import PluginConfig
class NetBoxMapConfig(PluginConfig):
name = 'netbox_map'
verbose_name = 'NetBox map'
description = 'A NetBox plugin to add a map'
version = '0.1'
base_url = 'map'
config = NetBoxMapConfigsetup.py
from setuptools import find_packages, setup
setup(
name='netbox-map',
version='0.1',
description='A NetBox plugin to add a map',
install_requires=[],
packages=find_packages(),
include_package_data=True,
zip_safe=False,
)Additional context
- The plugin is installed inside the active NetBox virtual environment
PLUGINS = ['netbox_map']is set inconfiguration.py- The package can be found in
site-packages - This setup follows the tutorial exactly, but NetBox fails during plugin import
At this point, it’s unclear whether:
- an additional step is required for recent NetBox versions, or
- the tutorial is missing or outdated regarding plugin discovery
Any clarification or guidance would be appreciated.
Thanks for maintaining the tutorial and the NetBox plugin framework.
Metadata
Metadata
Assignees
Labels
No labels