Unable to view script results #7359

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

Originally created by @sleepinggenius2 on GitHub (Dec 15, 2022).

Originally assigned to: @jeremystretch on GitHub.

NetBox version

v3.4.0

Python version

3.8

Steps to Reproduce

  1. Have a script in the scripts directory
  2. Navigate to Other > Scripts
  3. Click on the Last Run link or Run Script button for the script
  4. Receive error

Expected Behavior

The script results should be displayed.

Observed Behavior

Server Error
There was a problem with your request. Please contact an administrator.

The complete exception is provided below:

<class 'django.template.exceptions.TemplateSyntaxError'>

Invalid filter: 'naturaltime'

Python version: 3.8.9
NetBox version: 3.4.0

It looks like this was introduced in 4297c65f87 and is caused by a missing {% load humanize %} line in netbox/templates/extras/htmx/script_result.html, but that line is present in netbox/templates/extras/htmx/report_result.html and I can confirm that reports are unaffected, it's just scripts.

Originally created by @sleepinggenius2 on GitHub (Dec 15, 2022). Originally assigned to: @jeremystretch on GitHub. ### NetBox version v3.4.0 ### Python version 3.8 ### Steps to Reproduce 1. Have a script in the scripts directory 2. Navigate to **Other > Scripts** 3. Click on the **Last Run** link or **Run Script** button for the script 4. Receive error ### Expected Behavior The script results should be displayed. ### Observed Behavior **Server Error** There was a problem with your request. Please contact an administrator. The complete exception is provided below: ``` <class 'django.template.exceptions.TemplateSyntaxError'> Invalid filter: 'naturaltime' Python version: 3.8.9 NetBox version: 3.4.0 ``` It looks like this was introduced in 4297c65f874fd30cf24bc1977025065072a47717 and is caused by a missing `{% load humanize %}` line in `netbox/templates/extras/htmx/script_result.html`, but that line is present in `netbox/templates/extras/htmx/report_result.html` and I can confirm that reports are unaffected, it's just scripts.
adam added the type: bugstatus: accepted labels 2025-12-29 20:22:16 +01:00
adam closed this issue 2025-12-29 20:22:17 +01:00
Author
Owner

@jeremystretch commented on GitHub (Dec 15, 2022):

It looks like this was introduced in 4297c65f87 and is caused by a missing {% load humanize %} line

Confirmed; this was an oversight on my part. 😞

This will be fixed in v3.4.1. In the interim, it can be mitigated by adding {% load humanize %} to the top of netbox/templates/extras/htmx/script_result.html.

@jeremystretch commented on GitHub (Dec 15, 2022): > It looks like this was introduced in https://github.com/netbox-community/netbox/commit/4297c65f874fd30cf24bc1977025065072a47717 and is caused by a missing {% load humanize %} line Confirmed; this was an oversight on my part. :disappointed: This will be fixed in v3.4.1. In the interim, it can be mitigated by adding `{% load humanize %}` to the top of `netbox/templates/extras/htmx/script_result.html`.
Author
Owner

@Arshnika commented on GitHub (Dec 15, 2022):

I had the same issue. The good news is the issue has been fixed by adding {% load humanize %} to the top of netbox/templates/extras/htmx/script_result.html file as per Jermey's advise.

@Arshnika commented on GitHub (Dec 15, 2022): I had the same issue. The good news is the issue has been fixed by adding {% load humanize %} to the top of netbox/templates/extras/htmx/script_result.html file as per Jermey's advise.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#7359