Running report via management command results in missing argument 'job_result' #4079

Closed
opened 2025-12-29 18:33:00 +01:00 by adam · 2 comments
Owner

Originally created by @olafz on GitHub (Sep 8, 2020).

Originally assigned to: @lampwins on GitHub.

Environment

  • Python version: Python 3.7.9
  • NetBox version: 2.9.3

Steps to Reproduce

I'm following the exact instructions on https://netbox.readthedocs.io/en/stable/additional-features/reports/ to create an (example) report.

  1. Create a file DeviceConnectionsReport.py in the Netbox reports directory
  2. Paste the example code from https://netbox.readthedocs.io/en/stable/additional-features/reports/
  3. Run python3 manage.py runreport DeviceConnectionsReport

Expected Behavior

I would expect the example report to run and produce results.

Observed Behavior

$ python3 manage.py runreport DeviceConnectionsReport
[17:50:53] Running DeviceConnectionsReport.DeviceConnectionsReport...
Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python3.7/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python3.7/site-packages/django/core/management/__init__.py", line 395, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python3.7/site-packages/django/core/management/base.py", line 330, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python3.7/site-packages/django/core/management/base.py", line 371, in execute
    output = self.handle(*args, **options)
  File "/opt/netbox/netbox/extras/management/commands/runreport.py", line 27, in handle
    report.run()
TypeError: run() missing 1 required positional argument: 'job_result'

PS: I ended up trying via the commandline, because in the webinterface and API the report (also) fails.

Originally created by @olafz on GitHub (Sep 8, 2020). Originally assigned to: @lampwins on GitHub. ### Environment * Python version: Python 3.7.9 * NetBox version: 2.9.3 ### Steps to Reproduce I'm following the exact instructions on https://netbox.readthedocs.io/en/stable/additional-features/reports/ to create an (example) report. 1. Create a file `DeviceConnectionsReport.py` in the Netbox reports directory 2. Paste the example code from https://netbox.readthedocs.io/en/stable/additional-features/reports/ 3. Run `python3 manage.py runreport DeviceConnectionsReport` ### Expected Behavior I would expect the example report to run and produce results. ### Observed Behavior ``` $ python3 manage.py runreport DeviceConnectionsReport [17:50:53] Running DeviceConnectionsReport.DeviceConnectionsReport... Traceback (most recent call last): File "manage.py", line 10, in <module> execute_from_command_line(sys.argv) File "/usr/local/lib/python3.7/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line utility.execute() File "/usr/local/lib/python3.7/site-packages/django/core/management/__init__.py", line 395, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/usr/local/lib/python3.7/site-packages/django/core/management/base.py", line 330, in run_from_argv self.execute(*args, **cmd_options) File "/usr/local/lib/python3.7/site-packages/django/core/management/base.py", line 371, in execute output = self.handle(*args, **options) File "/opt/netbox/netbox/extras/management/commands/runreport.py", line 27, in handle report.run() TypeError: run() missing 1 required positional argument: 'job_result' ``` _PS: I ended up trying via the commandline, because in the webinterface and API the report (also) fails._
adam added the type: bugstatus: accepted labels 2025-12-29 18:33:00 +01:00
adam closed this issue 2025-12-29 18:33:00 +01:00
Author
Owner

@jeremystretch commented on GitHub (Sep 9, 2020):

@lampwins can you look into this please?

@jeremystretch commented on GitHub (Sep 9, 2020): @lampwins can you look into this please?
Author
Owner

@lampwins commented on GitHub (Sep 9, 2020):

Yep, I will take this. I forgot this management command exists. Should just have to modify it to follow the same execution pattern and wait on the results.

@lampwins commented on GitHub (Sep 9, 2020): Yep, I will take this. I forgot this management command exists. Should just have to modify it to follow the same execution pattern and wait on the results.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#4079