-
I can "run script" the custom script via Web. But CLI keeps throwing:
`(virtnetbox) [netbox@host bin]$ python3 /usr/local/netbox/scripts/testExporter.py runscript --loglevel debug Traceback (most recent call last): |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
Custom Scripts and Plugins are two different things. "PluginConfig" is for plugins only; can you explain why your Custom Script needs to load PluginConfig? Having said that, I don't know why it works in the web UI. |
Beta Was this translation helpful? Give feedback.
-
This is not how you run scripts via. the CLI. Check out the docs here: https://docs.netbox.dev/en/stable/customization/custom-scripts/#via-the-cli
|
Beta Was this translation helpful? Give feedback.
If the file is
/opt/netbox/netbox/scripts/testExporter.py
, then you would do:By default it won't run a script in an arbitrary directory, but it might be possible with the
--pythonpath
flag.