A Exception in Custom Scripts and Reports is not show in the results. #3992

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

Originally created by @rebortg on GitHub (Aug 18, 2020).

Originally assigned to: @jeremystretch on GitHub.

Environment

  • Python version: 3.7 (netbox-docker)
  • NetBox version: 2.9-beta2

Steps to Reproduce

myscryipt.py:

class MyScript(Script):
    class Meta:
        name = "Script Test"

    def run(self, data, commit):
        raise Exception

myreports.py:

from extras.reports import Report


class ReportTest(Report):
    def test_one(self):
        raise Exception

Expected Behavior

Script in v2.8.9:
image

Report in v2.8.9:
image

Observed Behavior

Scripts in 2.9-beta2:
image

Reports in 2.9-beta2:
image

This make it very hard to debug a custom script or report.

Originally created by @rebortg on GitHub (Aug 18, 2020). Originally assigned to: @jeremystretch on GitHub. <!-- NOTE: IF YOUR ISSUE DOES NOT FOLLOW THIS TEMPLATE, IT WILL BE CLOSED. This form is only for reproducible bugs. If you need assistance with NetBox installation, or if you have a general question, DO NOT open an issue. Instead, post to our mailing list: https://groups.google.com/forum/#!forum/netbox-discuss Please describe the environment in which you are running NetBox. Be sure that you are running an unmodified instance of the latest stable release before submitting a bug report, and that any plugins have been disabled. --> ### Environment * Python version: 3.7 (netbox-docker) * NetBox version: 2.9-beta2 <!-- Describe in detail the exact steps that someone else can take to reproduce this bug using the current stable release of NetBox. Begin with the creation of any necessary database objects and call out every operation being performed explicitly. If reporting a bug in the REST API, be sure to reconstruct the raw HTTP request(s) being made: Don't rely on a client library such as pynetbox. --> ### Steps to Reproduce myscryipt.py: ``` class MyScript(Script): class Meta: name = "Script Test" def run(self, data, commit): raise Exception ``` myreports.py: ``` from extras.reports import Report class ReportTest(Report): def test_one(self): raise Exception ``` <!-- What did you expect to happen? --> ### Expected Behavior Script in v2.8.9: ![image](https://user-images.githubusercontent.com/24626486/90479011-52ac7300-e12e-11ea-9deb-c92b0ec176f9.png) Report in v2.8.9: ![image](https://user-images.githubusercontent.com/24626486/90478883-1416b880-e12e-11ea-98fb-41e3098401f0.png) <!-- What happened instead? --> ### Observed Behavior Scripts in 2.9-beta2: ![image](https://user-images.githubusercontent.com/24626486/90477900-8090b800-e12c-11ea-9087-b4d86c43aa2e.png) Reports in 2.9-beta2: ![image](https://user-images.githubusercontent.com/24626486/90479506-1594b080-e12f-11ea-81fd-30067f43b6c0.png) This make it very hard to debug a custom script or report.
adam added the type: bugstatus: acceptedbeta labels 2025-12-29 18:32:30 +01:00
adam closed this issue 2025-12-29 18:32:30 +01:00
Author
Owner

@dgarros commented on GitHub (Aug 18, 2020):

I'm got the same issue and I agree it's hard to troubleshooting what is happening in the reports/scripts (running 2.9-beta2)
Even in the worker log I'm not getting a lot of information, just the error message not the stacktrace

@dgarros commented on GitHub (Aug 18, 2020): I'm got the same issue and I agree it's hard to troubleshooting what is happening in the reports/scripts (running 2.9-beta2) Even in the worker log I'm not getting a lot of information, just the error message not the stacktrace
Author
Owner

@jeremystretch commented on GitHub (Aug 18, 2020):

@lampwins want to take this one?

@jeremystretch commented on GitHub (Aug 18, 2020): @lampwins want to take this one?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#3992