Netbox: Running report via management command results in missing argument 'job_result'

Created on 8 Sep 2020  路  2Comments  路  Source: netbox-community/netbox

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._

accepted bug

Most helpful comment

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.

All 2 comments

@lampwins can you look into this please?

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.

Was this page helpful?
0 / 5 - 0 ratings