Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to view script results #11185

Closed
sleepinggenius2 opened this issue Dec 15, 2022 · 2 comments
Closed

Unable to view script results #11185

sleepinggenius2 opened this issue Dec 15, 2022 · 2 comments
Assignees
Labels
status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application

Comments

@sleepinggenius2
Copy link
Contributor

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 4297c65 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.

@sleepinggenius2 sleepinggenius2 added the type: bug A confirmed report of unexpected behavior in the application label Dec 15, 2022
@jeremystretch jeremystretch added the status: accepted This issue has been accepted for implementation label Dec 15, 2022
@jeremystretch jeremystretch self-assigned this Dec 15, 2022
@jeremystretch
Copy link
Member

jeremystretch commented Dec 15, 2022

It looks like this was introduced in 4297c65 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.

@Arshnika
Copy link

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.

@jeremystretch jeremystretch unpinned this issue Dec 16, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

No branches or pull requests

3 participants