Running example custom script via Web-UI results in missing argument 'queryset' #4929

Closed
opened 2025-12-29 19:22:21 +01:00 by adam · 1 comment
Owner

Originally created by @phdsbr on GitHub (May 18, 2021).

NetBox version

v2.8.4

Python version

3.7

Steps to Reproduce

  1. Copy custom script example from https://netbox.readthedocs.io/en/stable/additional-features/custom-scripts/ to default custom scripts path /opt/netbox/netbox/scripts/create-sites.py
  2. Access custom-scripts web page (http://netbox/extras/scripts) via web-browser

Expected Behavior

Custom script "Create Sites" web-page should appear.

Observed Behavior

A Server Error has raised.

Server Error
There was a problem with your request. Please contact an administrator.

The complete exception is provided below:

<class 'TypeError'>

__init__() missing 1 required positional argument: 'queryset'
If further assistance is required, please post to the NetBox mailing list.

image

Originally created by @phdsbr on GitHub (May 18, 2021). ### NetBox version v2.8.4 ### Python version 3.7 ### Steps to Reproduce 1. Copy custom script example from https://netbox.readthedocs.io/en/stable/additional-features/custom-scripts/ to default custom scripts path /opt/netbox/netbox/scripts/create-sites.py 2. Access custom-scripts web page (http://netbox/extras/scripts) via web-browser ### Expected Behavior Custom script "Create Sites" web-page should appear. ### Observed Behavior A Server Error has raised. ``` Server Error There was a problem with your request. Please contact an administrator. The complete exception is provided below: <class 'TypeError'> __init__() missing 1 required positional argument: 'queryset' If further assistance is required, please post to the NetBox mailing list. ``` ![image](https://user-images.githubusercontent.com/30222668/118727743-a3f6a980-b809-11eb-8408-684fc48b1686.png)
adam added the type: bug label 2025-12-29 19:22:21 +01:00
adam closed this issue 2025-12-29 19:22:21 +01:00
Author
Owner

@jeremystretch commented on GitHub (May 19, 2021):

v2.8.4

The documentation is written for the current NetBox release (v2.11). Please upgrade your installation to a more recent release, or adapt the example script to fit the supported implementation for your release.

@jeremystretch commented on GitHub (May 19, 2021): > v2.8.4 The documentation is written for the current NetBox release (v2.11). Please upgrade your installation to a more recent release, or adapt the example script to fit the supported implementation for your release.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#4929