Template error - expecting ; javascript

I am getting an error in all of my templates for all the paths in buttons. This error appeared after I switched computers and opened the project in VS Code. The odd thing is it runs just fine, no errors in the browser but every template with a button that specifies a url yields the error.

{% extends "ESG/layout.html" %}

{% block content %}
<style>
</style>
{% csrf_token %}

<div class=t4>

<!-- Use text in Introduction in DB for text in HTML Page-->
{{ intro_text|safe}}
</div>
<button input type='button' name=Begin Survey onclick="location.href='{% url 'results' pathstr=current_path %}'"><lable>Begin Survey</lable></button>
{% endblock %}

Error details:

[{
	"resource": "/Volumes/Backup/Current Python Projects/Python Projects/Strategia/ESG/templates/ESG/introduction.html",
	"owner": "_generated_diagnostic_collection_name_#1",
	"severity": 8,
	"message": "';' expected.",
	"source": "javascript",
	"startLineNumber": 13,
	"startColumn": 79,
	"endLineNumber": 13,
	"endColumn": 86
}]

It doesn’t seem to matter if the template extends another or not, but here is the template that is extended:

{% load static %}

<!DOCTYPE html>
<html lang = "en">
<meta name="viewport" content="width=device-width, initial-scale=1, height=device-height">
<head>
    <link rel="stylesheet" href="{% static 'css/styles.css' %}">
    <script src="{% static 'js/echarts.js' %}"></script>
    <title>{{ browsertab }}</title>
</head>
<body>
    <h1>{{ dashboard_title }}</h1>
    
<!--Create flexbox to render header graphic--> 
    <div class="container_layout" style="top: 5%;">
<!--Create LOO shape-->    
        <div class="item_LoO_Name">
          <div class="t1">{{ project }}</div>
          <div class="t2">{{ projecttext }}</div>
        </div>
<!--Create row of topic shapes and spacer between shapes-->
        {%for x_topics in surveytopics%}
        <div class="space"></div>
        <div class={{x_topics.context}}>{{ x_topics.area }}</div> 
      {% endfor %}  
<!--Create pointed arrow and space to Outcome-->
      <div class="space"></div>
      <div class="triangle-right"></div>
      <div class="spaceblank"></div>        
<!--Create Outcome Shape-->
      <div class="item_Outcome_Name">
        <div class="t1">{{outcome}}</div>
        <div class="t3">{{ outcometext }}</div>
      </div>
    </div> 
    <br>  
    {% block content %}
    {% endblock %}
</body>
</html>

Where exactly are you seeing this error? Is this in your browser? Some other script?

This isn’t any Django error I’m familiar with.

Line 13 of the template you’ve posted is:
<button input type='button' name=Begin Survey onclick="location.href='{% url 'results' pathstr=current_path %}'"><lable>Begin Survey</lable></button>

My guess is that this is a false reporting of an error, in that whatever tool you’re using that is showing you an error doesn’t understand Django template language and doesn’t know that what’s between the {% %} markers represent text that will be substituted by the rendering engine.

Thanks. It shows up in VS, the IDE I use, in the PROBLEMS section of the terminal view. I just found it odd when I moved the project to a new computer all of a sudden this error appeared.

Given everything works, I suspect VS Code is incorrectly reporting it as a javascript error.

Yes. VS code is using js error checking in html/django files, that’s why. Of course it would show errors. Because django template tags are not js. It will show up as errors.

Screenshot (15033).png4

See, in sublime we can change syntax/type.

Just click on HTML(django) text.