Skip to content
Discussion options

You must be logged in to vote

I was able to reproduce your problem simply by putting a syntax error in a script: raised as #15353 so that this error handling can be improved in Netbox. I think the chances are that you've done the same.

You may get a more useful error message by running the following at the CLI:

/opt/netbox/venv/bin/python /opt/netbox/netbox/scripts/ipnet.py

If that doesn't show a syntax error, but instead shows a library loading error like ModuleNotFoundError: No module named 'extras', then temporarily add the following four lines at the very top of your script, and try again:

import django, os, sys
sys.path.append('/opt/netbox/netbox')
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'netbox.settings…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@john2893
Comment options

Answer selected by john2893
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants