NoneType object has no attribute 'items' #5298

Closed
opened 2025-12-29 19:26:22 +01:00 by adam · 2 comments
Owner

Originally created by @ifoughal on GitHub (Sep 2, 2021).

NetBox version

v3.0.0

Python version

3.9

Steps to Reproduce

  1. Create/import an existing report to Netbox v3.0.0
  2. Execute report through the GUI & later on through nbshell.

Expected Behavior

Netbox should be able to run the report script on version 3.0.0 just as in 2.11.12

Observed Behavior

Netbox fails to run the report and debugs with the following:

Traceback (most recent call last):
  File "/opt/netbox/netbox/./manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/opt/netbox/venv/lib/python3.9/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
    utility.execute()
  File "/opt/netbox/venv/lib/python3.9/site-packages/django/core/management/__init__.py", line 413, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/opt/netbox/venv/lib/python3.9/site-packages/django/core/management/base.py", line 354, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/opt/netbox/venv/lib/python3.9/site-packages/django/core/management/base.py", line 398, in execute
    output = self.handle(*args, **options)
  File "/opt/netbox/netbox/extras/management/commands/runreport.py", line 54, in handle
    for test_name, attrs in job_result.data.items():
AttributeError: 'NoneType' object has no attribute 'items'
Originally created by @ifoughal on GitHub (Sep 2, 2021). ### NetBox version v3.0.0 ### Python version 3.9 ### Steps to Reproduce 1. Create/import an existing report to Netbox v3.0.0 2. Execute report through the GUI & later on through nbshell. ### Expected Behavior Netbox should be able to run the report script on version 3.0.0 just as in 2.11.12 ### Observed Behavior Netbox fails to run the report and debugs with the following: ``` Traceback (most recent call last): File "/opt/netbox/netbox/./manage.py", line 10, in <module> execute_from_command_line(sys.argv) File "/opt/netbox/venv/lib/python3.9/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line utility.execute() File "/opt/netbox/venv/lib/python3.9/site-packages/django/core/management/__init__.py", line 413, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/opt/netbox/venv/lib/python3.9/site-packages/django/core/management/base.py", line 354, in run_from_argv self.execute(*args, **cmd_options) File "/opt/netbox/venv/lib/python3.9/site-packages/django/core/management/base.py", line 398, in execute output = self.handle(*args, **options) File "/opt/netbox/netbox/extras/management/commands/runreport.py", line 54, in handle for test_name, attrs in job_result.data.items(): AttributeError: 'NoneType' object has no attribute 'items' ```
adam added the type: bug label 2025-12-29 19:26:22 +01:00
adam closed this issue 2025-12-29 19:26:22 +01:00
Author
Owner

@jeremystretch commented on GitHub (Sep 2, 2021):

Please upgrade to v3.0.1 and try again.

If you still experience the error, please share a complete report that someone else can try to reproduce the reported behavior.

@jeremystretch commented on GitHub (Sep 2, 2021): Please upgrade to v3.0.1 and try again. If you still experience the error, please share a complete report that someone else can try to reproduce the reported behavior.
Author
Owner

@ifoughal commented on GitHub (Sep 2, 2021):

Please upgrade to v3.0.1 and try again.

If you still experience the error, please share a complete report that someone else can try to reproduce the reported behavior.

Please close this issue. I realised that this was related to my cache, as I'm using CI/CD for my code deployment, this doesn't get refreshed on Netbox side, so the script fails to run.

Apologies for opening the ticket.

@ifoughal commented on GitHub (Sep 2, 2021): > Please upgrade to v3.0.1 and try again. > > If you still experience the error, please share a complete report that someone else can try to reproduce the reported behavior. Please close this issue. I realised that this was related to my cache, as I'm using CI/CD for my code deployment, this doesn't get refreshed on Netbox side, so the script fails to run. Apologies for opening the ticket.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#5298