Unable to run scripts from CLI in v4.0 #9621

Closed
opened 2025-12-29 21:19:50 +01:00 by adam · 0 comments
Owner

Originally created by @ingvaldlorentzen on GitHub (May 8, 2024).

Originally assigned to: @jeremystretch on GitHub.

Deployment Type

Self-hosted

NetBox Version

v4.0.0

Python Version

3.11

Steps to Reproduce

  1. Create a script
  2. Run it with `python manage.py runscript 'module.ScriptName' inside the NetBox instance

Expected Behavior

Script should run.

Observed Behavior

Script fails with:

AttributeError: 'Script' object has no attribute 'full_name'

Running the same script from GUI works fine, have tried multiple scripts, and haven't been able to run any via CLI in v4.

Seems to be this line that fails: https://github.com/netbox-community/netbox/blob/develop/netbox/extras/management/commands/runscript.py#L104

Originally created by @ingvaldlorentzen on GitHub (May 8, 2024). Originally assigned to: @jeremystretch on GitHub. ### Deployment Type Self-hosted ### NetBox Version v4.0.0 ### Python Version 3.11 ### Steps to Reproduce 1. Create a script 2. Run it with `python manage.py runscript 'module.ScriptName' inside the NetBox instance ### Expected Behavior Script should run. ### Observed Behavior Script fails with: > AttributeError: 'Script' object has no attribute 'full_name' Running the same script from GUI works fine, have tried multiple scripts, and haven't been able to run any via CLI in v4. Seems to be this line that fails: https://github.com/netbox-community/netbox/blob/develop/netbox/extras/management/commands/runscript.py#L104
adam added the type: bugstatus: acceptedseverity: medium labels 2025-12-29 21:19:50 +01:00
adam closed this issue 2025-12-29 21:19:51 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#9621