No error trace on reports #8915

Closed
opened 2025-12-29 20:42:49 +01:00 by adam · 1 comment
Owner

Originally created by @PaulR282 on GitHub (Dec 5, 2023).

NetBox version

v3.6.6

Python version

3.10

Steps to Reproduce

  1. Add a report that crashes into the errored state

example:

from extras.reports import Report

class testtrace(Report):
    name = "testtrace"
    description = "testtrace"
    def test_trace(self):
        if true:
            raise NotImplementedError("Error")
        self.log_info(".",".")

Expected Behavior

A trace should be shown so you can troubleshoot the problem

Observed Behavior

image

Originally created by @PaulR282 on GitHub (Dec 5, 2023). ### NetBox version v3.6.6 ### Python version 3.10 ### Steps to Reproduce 1. Add a report that crashes into the `errored` state example: ``` from extras.reports import Report class testtrace(Report): name = "testtrace" description = "testtrace" def test_trace(self): if true: raise NotImplementedError("Error") self.log_info(".",".") ``` ### Expected Behavior A trace should be shown so you can troubleshoot the problem ### Observed Behavior ![image](https://github.com/netbox-community/netbox/assets/47193860/7619f672-14b3-4de6-ad24-fe591f3af72c)
adam added the type: bug label 2025-12-29 20:42:49 +01:00
adam closed this issue 2025-12-29 20:42:49 +01:00
Author
Owner

@jeremystretch commented on GitHub (Dec 5, 2023):

The report results list is intended to convey only information logged by reports directly, and not fatal errors. This would need to be a feature request, however #13334 has already been implemented for the upcoming release of NetBox v3.7. This change ensures that any errors resulting from the execution of a background job are recorded on the job record itself, which I believe satisfies your use case.

Also, take note that reports are slated for removal in NetBox v4.0 (see #12510).

@jeremystretch commented on GitHub (Dec 5, 2023): The report results list is intended to convey only information logged by reports directly, and not fatal errors. This would need to be a feature request, however #13334 has already been implemented for the upcoming release of NetBox v3.7. This change ensures that any errors resulting from the execution of a background job are recorded on the job record itself, which I believe satisfies your use case. Also, take note that reports are slated for removal in NetBox v4.0 (see #12510).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#8915