title: Why am I getting jinja2.exceptions.TemplateSyntaxError: unexpected '}'
body: <p>I can't figure-out why this error occuring,</p>
  
  <pre><code>{% block body %}
  
  &lt;!-- Content --&gt;
  
  
  &lt;div class="container"&gt;
      &lt;div class="row"&gt;
      &lt;div class="col-lg-12"&gt;
                            &lt;br&gt;
                                      &lt;div class="header"&gt;&lt;h3&gt;Ongoing Matches&lt;/h3&gt;&lt;/div&gt;
                                      &lt;br&gt;
                                  &lt;h3&gt;{{ datestring_today }}&lt;/h3&gt;
                            &lt;br&gt;
                                &lt;script src="//www.cricruns.com/widget/widget_livebar.js" type="text/javascript"&gt;&lt;/script&gt;
                      &lt;! --summary----&gt;
                           &lt;div class="list-group"&gt;
                            {% for  game in gamest %}
                                  {% if game[]}
                             &lt;a class="score-size text-xs-center nounderline list-group-item list-group-item-action" &gt;
                               &lt;div class="row"&gt;
                                &lt;div class="col-xs-4"&gt;
                                    {% if game["Batting_team_img"] %}
                                    &lt;img class="team-logo" src="/static/{{ game["Batting_team_img"] }}"&gt;
                                    {% endif %}
                                    {{ game["Batting team"] }} {{ game["runs10"] }}
                                    &lt;/b&gt;
                                    &lt;br&gt;
                                    {{ game["wickets10"] }}
                                &lt;/div&gt;
  
                                &lt;div class="col-xs-4 broadcast-column"&gt;
                                    &lt;div class="final-text"&gt;
                                        {{ game["status2"] }}
                                    &lt;/div&gt;
                                    &lt;div class="broadcaster"&gt;
                                        {{ game["series2"] }}
                                    &lt;/div&gt;
                                &lt;/div&gt;
  
                                &lt;div class="col-xs-4"&gt;
                                      {% if game["Bowling_team_img"] %}
                                      &lt;img class="team-logo" src="/static/{{ game["Bowling_team_img"] }}"&gt;
                                      {% endif %}
                                      {{ game["Bowling team"] }} {{ game["runs20"] }}
                                      &lt;/b&gt;
                                      &lt;br&gt;
                                      {{ game["wickets20"] }}
                                &lt;/div&gt;
                               &lt;/div&gt;
                              &lt;/a&gt;
                            {% endfor %}
                               &lt;/div&gt;
                           &lt;/div&gt;
                       &lt;/div&gt;
                       &lt;br&gt;&lt;/br&gt;
                       &lt;div class="row"&gt;
                             &lt;div class="col-lg-12"&gt;
                            &lt;table class="standings-datatable table table-sm"&gt;
                                    &lt;thead&gt;
                                          &lt;tr  class="bg-primary text-white"&gt;
                                                    &lt;th class="text-lg-center"&gt;Match Type&lt;/th&gt;
                                                    &lt;th class="bg-danger text-lg-center"&gt;Series&lt;/th&gt;
                                                    &lt;th class="bg-dark text-lg-center"&gt;Team vs Team&lt;/th&gt;
                                                    &lt;th class="bg-info text-lg-center"&gt;Status&lt;/th&gt;
                                                    &lt;th class="bg-light text-lg-center"&gt;Batting &lt;/th&gt;
                                                      &lt;th class="bg-primary text-lg-center"&gt;Runs&lt;/th&gt;
                                                      &lt;th class="bg-secondary text-lg-center"&gt;Wickets&lt;/th&gt;
                                                      &lt;th class="bg-success text-lg-center"&gt;Overs&lt;/th&gt;
                                                      &lt;th class="bg-transparent text-lg-center"&gt;Batsman Name&lt;/th&gt;
                                                      &lt;th class="bg-warning text-lg-center"&gt;Batsman Score&lt;/th&gt;
                                            &lt;th class="bg-transparent text-lg-center"&gt;Batsman Name&lt;/th&gt;
                                                      &lt;th class="bg-warning text-lg-center"&gt;Batsman Score&lt;/th&gt;
                                                      &lt;th class="bg-transparent text-lg-center"&gt;Bowler Name&lt;/th&gt;
                                                      &lt;th class="bg-warning text-lg-center"&gt;Bowler Wickets&lt;/th&gt;
                                                      &lt;th class="bg-transparent text-lg-center"&gt;Bowler Name&lt;/th&gt;
                                                      &lt;th class="bg-warning text-lg-center"&gt;Bowler Wickets&lt;/th&gt;
                                          &lt;/tr&gt;
                                    &lt;/thead&gt;
                                  &lt;tbody&gt;
                                  {% for game in gamest %}
                                      &lt;tr class="table table-bordered"&gt;
                                            &lt;td &gt;{{ game['matchtype2'] }}&lt;/td&gt;
                                                    &lt;td&gt;{{ game['series2'] }}&lt;/td&gt;
                                                    &lt;td&gt;{{ game['teams2'] }}&lt;/td&gt;
                                                    &lt;td&gt;{{ game['status2'] }}&lt;/td&gt;
                                            &lt;td&gt;{{ game['Batting team'] }}&lt;/td&gt;
                                                      &lt;td&gt;{{ game['runs10'] }}&lt;/td&gt;
                                                      &lt;td&gt;{{ game['wickets10'] }}&lt;/td&gt;
                                                      &lt;td&gt;{{ game['overs10'] }}&lt;/td&gt;
                                                      &lt;td&gt;{{ game['name1'] }}&lt;/td&gt;
                                                      &lt;td&gt;{{ game['runs1'] }}&lt;/td&gt;
                                            &lt;td&gt;{{ game['name2'] }}&lt;/td&gt;
                                                      &lt;td&gt;{{ game['runs2'] }}&lt;/td&gt;
                                            &lt;td&gt;{{ game['name5'] }}&lt;/td&gt;
                                                    &lt;td&gt;{{ game['wickets5'] }}&lt;/td&gt;
                                                      &lt;td&gt;{{ game['name6'] }}&lt;/td&gt;
                                                    &lt;td&gt;{{ game['wickets6'] }}&lt;/td&gt;
                                      &lt;/tr&gt;
                                  {% endfor %}
                                  &lt;/tbody&gt;
                                  &lt;/table&gt;
                          &lt;/div&gt;
                              &lt;/div&gt;
                              &lt;br&gt;&lt;/br&gt;
  
                              &lt;table class="standings-datatable table table-sm"&gt;
                                  &lt;thead class="thead-inverse"&gt;
                                   &lt;tbody&gt;
                                   &lt;tr&gt;
  
                                              &lt;th class="bg-dark text-lg-left"&gt;TEAM&lt;/th&gt;
                                              &lt;th class="bg-dark text-lg-center"&gt;M&lt;/th&gt;
                                              &lt;th class="bg-dark text-lg-left"&gt;W&lt;/th&gt;
                                              &lt;th class="bg-dark text-lg-left"&gt;L&lt;/th&gt;
                                              &lt;th class="bg-dark text-lg-left"&gt;T&lt;/th&gt;
                                              &lt;th class="bg-dark text-lg-left"&gt;N/R&lt;/th&gt;
                                              &lt;th class="bg-dark text-lg-left"&gt;PT&lt;/th&gt;
                                              &lt;th class="bg-dark text-lg-left"&gt;NRR&lt;/th&gt;
                                              &lt;th class="bg-dark text-lg-left"&gt;FOR&lt;/th&gt;
                                              &lt;th class="bg-dark text-lg-left"&gt;AGAINST&lt;/th&gt;
  
  
  
                                   &lt;/tr&gt;
                                  &lt;/thead&gt;
  
                                      {% for key in tabledata %}
                                              &lt;tr&gt;
  
                                              &lt;td&gt;{{ key['Sydney image'] }}&lt;/td&gt;
                                              &lt;td&gt;{{ key['Sydney Thunder M'] }}&lt;/td&gt;
                                              &lt;td&gt;{{ key['Sydney Thunder For'] }}&lt;/td&gt;
                                              &lt;td&gt;{{ key['Sydney Thunder PT'] }}&lt;/td&gt;
                                              &lt;td&gt;{{ key['Sydney Thunder W'] }}&lt;/td&gt;
                                              &lt;td&gt;{{ key['Sydney THunder AGAINST'] }}&lt;/td&gt;
                                              &lt;td&gt;{{ key['Sydney THunder N/R'] }}&lt;/td&gt;
                                              &lt;td&gt;{{ key['Sydney THunder L'] }}&lt;/td&gt;
                                              &lt;td&gt;{{ key['Sydney THunder T'] }}&lt;/td&gt;
                                              &lt;td&gt;{{ key['Sydney THunder NRR'] }}&lt;/td&gt;
  
                                              &lt;/tr&gt;
                                              &lt;tr&gt;
  
                                              &lt;td&gt;{{ key['Brisbane image'] }}&lt;/td&gt;
                                              &lt;td&gt;{{ key['Brisbane Heat  M'] }}&lt;/td&gt;
                                              &lt;td&gt;{{ key['Brisbane Heat  For'] }}&lt;/td&gt;
                                              &lt;td&gt;{{ key['Brisbane Heat  PT'] }}&lt;/td&gt;
                                              &lt;td&gt;{{ key['Brisbane Heat  W'] }}&lt;/td&gt;
                                              &lt;td&gt;{{ key['Brisbane Heat  AGAINST'] }}&lt;/td&gt;
                                              &lt;td&gt;{{ key['Brisbane Heat  N/R'] }}&lt;/td&gt;
                                              &lt;td&gt;{{ key['Brisbane Heat  L'] }}&lt;/td&gt;
                                              &lt;td&gt;{{ key['Brisbane Heat  T'] }}&lt;/td&gt;
                                              &lt;td&gt;{{ key['Brisbane Heat NRR'] }}&lt;/td&gt;
  
  
                                              &lt;/tr&gt;
  
                                              &lt;tr &gt;
  
                                                  &lt;td&gt;{{ key['Adelaide strikers image'] }}&lt;/td&gt;
                                                  &lt;td&gt;{{ key['Adelaide Strikers M'] }}&lt;/td&gt;
                                                  &lt;td&gt;{{ key['Adelaide Strikers For'] }}&lt;/td&gt;
                                                  &lt;td&gt;{{ key['Adelaide Strikers PT'] }}&lt;/td&gt;
                                                  &lt;td&gt;{{ key['Adelaide Strikers W'] }}&lt;/td&gt;
                                                  &lt;td&gt;{{ key['Adelaide Strikers AGAINST'] }}&lt;/td&gt;
                                                  &lt;td&gt;{{ key['Adelaide Strikers N/R'] }}&lt;/td&gt;
                                                  &lt;td&gt;{{ key['Adelaide Strikers L'] }}&lt;/td&gt;
                                                  &lt;td&gt;{{ key['Adelaide Strikers T'] }}&lt;/td&gt;
                                                  &lt;td&gt;{{ key['Adelaide Strikers NRR'] }}&lt;/td&gt;
                                              &lt;/tr&gt;
                                              &lt;tr &gt;
  
                                                  &lt;td&gt;{{ key['Horbat Hurricanes image'] }}&lt;/td&gt;
                                                  &lt;td&gt;{{ key['Horbat Hurricanes M'] }}&lt;/td&gt;
                                                  &lt;td&gt;{{ key['Horbat Hurricanes For'] }}&lt;/td&gt;
                                                  &lt;td&gt;{{ key['Horbat Hurricanes PT'] }}&lt;/td&gt;
                                                  &lt;td&gt;{{ key['Horbat Hurricanes W'] }}&lt;/td&gt;
                                                  &lt;td&gt;{{ key['Horbat Hurricanes AGAINST'] }}&lt;/td&gt;
                                                  &lt;td&gt;{{ key['Horbat Hurricanes N/R'] }}&lt;/td&gt;
                                                  &lt;td&gt;{{ key['Horbat Hurricanes L'] }}&lt;/td&gt;
                                                  &lt;td&gt;{{ key['Horbat Hurricanes T'] }}&lt;/td&gt;
                                                  &lt;td&gt;{{ key['Horbat Hurricanes NRR'] }}&lt;/td&gt;
                                              &lt;/tr&gt;
                                              &lt;tr &gt;
  
                                                  &lt;td&gt;{{ key['Melbourne Renegades image'] }}&lt;/td&gt;
                                                  &lt;td&gt;{{ key['Melbourne Renegades M'] }}&lt;/td&gt;
                                                  &lt;td&gt;{{ key['Melbourne Renegades For'] }}&lt;/td&gt;
                                                  &lt;td&gt;{{ key['Melbourne Renegades PT'] }}&lt;/td&gt;
                                                  &lt;td&gt;{{ key['Melbourne Renegades W'] }}&lt;/td&gt;
                                                  &lt;td&gt;{{ key['Melbourne Renegades AGAINST'] }}&lt;/td&gt;
                                                  &lt;td&gt;{{ key['Melbourne Renegades N/R'] }}&lt;/td&gt;
                                                  &lt;td&gt;{{ key['Melbourne Renegades L'] }}&lt;/td&gt;
                                                  &lt;td&gt;{{ key['Melbourne Renegades T'] }}&lt;/td&gt;
                                                  &lt;td&gt;{{ key['Melbourne Renegades NRR'] }}&lt;/td&gt;
                                              &lt;/tr&gt;
                                              &lt;tr &gt;
  
                                                  &lt;td&gt;{{ key['Melbourne stars image'] }}&lt;/td&gt;
                                                  &lt;td&gt;{{ key['Melbourne stars M'] }}&lt;/td&gt;
                                                  &lt;td&gt;{{ key['Melbourne stars For'] }}&lt;/td&gt;
                                                  &lt;td&gt;{{ key['Melbourne stars PT'] }}&lt;/td&gt;
                                                  &lt;td&gt;{{ key['Melbourne stars W'] }}&lt;/td&gt;
                                                  &lt;td&gt;{{ key['Melbourne stars AGAINST'] }}&lt;/td&gt;
                                                  &lt;td&gt;{{ key['Melbourne stars N/R'] }}&lt;/td&gt;
                                                  &lt;td&gt;{{ key['Melbourne stars L'] }}&lt;/td&gt;
                                                  &lt;td&gt;{{ key['Melbourne stars T'] }}&lt;/td&gt;
                                                  &lt;td&gt;{{ key['Melbourne stars NRR'] }}&lt;/td&gt;
                                              &lt;/tr&gt;
                                              &lt;tr &gt;
  
                                                  &lt;td&gt;{{ key['Perth Scorchers image'] }}&lt;/td&gt;
                                                  &lt;td&gt;{{ key['Perth Scorchers M'] }}&lt;/td&gt;
                                                  &lt;td&gt;{{ key['Perth Scorchers For'] }}&lt;/td&gt;
                                                  &lt;td&gt;{{ key['Perth Scorchers PT'] }}&lt;/td&gt;
                                                  &lt;td&gt;{{ key['Perth Scorchers W'] }}&lt;/td&gt;
                                                  &lt;td&gt;{{ key['Perth Scorchers AGAINST'] }}&lt;/td&gt;
                                                  &lt;td&gt;{{ key['Perth Scorchers N/R'] }}&lt;/td&gt;
                                                  &lt;td&gt;{{ key['Perth Scorchers L'] }}&lt;/td&gt;
                                                  &lt;td&gt;{{ key['Perth Scorchers T'] }}&lt;/td&gt;
                                                  &lt;td&gt;{{ key['Perth Scorchers NRR'] }}&lt;/td&gt;
                                              &lt;/tr&gt;
                                              &lt;tr &gt;
  
                                                  &lt;td&gt;{{ key['Sydney Sixers image'] }}&lt;/td&gt;
                                                  &lt;td&gt;{{ key['Sydney Sixers M'] }}&lt;/td&gt;
                                                  &lt;td&gt;{{ key['Sydney Sixers For'] }}&lt;/td&gt;
                                                  &lt;td&gt;{{ key['Sydney Sixers PT'] }}&lt;/td&gt;
                                                  &lt;td&gt;{{ key['Sydney Sixers W'] }}&lt;/td&gt;
                                                  &lt;td&gt;{{ key['Sydney Sixers AGAINST'] }}&lt;/td&gt;
                                                  &lt;td&gt;{{ key['Sydney Sixers N/R'] }}&lt;/td&gt;
                                                  &lt;td&gt;{{ key['Sydney Sixers L'] }}&lt;/td&gt;
                                                  &lt;td&gt;{{ key['Sydney Sixers T'] }}&lt;/td&gt;
                                                  &lt;td&gt;{{ key['Sydney Sixers NRR'] }}&lt;/td&gt;
                                              &lt;/tr&gt;
  
  
                                    {%endfor%}
                               &lt;/tbody&gt;
                              &lt;/table&gt;
  
  
                          &lt;div class="row"&gt;
                          &lt;div class="col-lg-6"&gt;
                                  &lt;a class="twitter-timeline" href="https://twitter.com/nikilr14/lists/hot-cric-tweets?ref_src=twsrc%5Etfw"data-aria-polite="assertive"data-chrome="noheader nofooter noborders scrollbar"data-width="500"
                               data-height="500"&gt;A Twitter List by nikilr14&lt;/a&gt;
                              &lt;script async src="https://platform.twitter.com/widgets.js" charset="utf-8"&gt;&lt;/script&gt;
                          &lt;/div&gt;
  
                              &lt;div class="col-lg-6"&gt;
                                  &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
  
  &lt;iframe id="youtube_video" width="600" height="340" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;
  
  &lt;script&gt;
  var channelID = "UCSRQXk5yErn4e14vN76upOw";
  $.getJSON('https://api.rss2json.com/v1/api.json?rss_url=https%3A%2F%2Fwww.youtube.com%2Ffeeds%2Fvideos.xml%3Fchannel_id%3D'+channelID, function(data) {
     var link = data.items[0].link;
     var id = link.substr(link.indexOf("=")+1);
      $("#youtube_video").attr("src","https://youtube.com/embed/"+id + "?controls=0&amp;showinfo=0&amp;rel=0");
  });
  &lt;/script&gt;
                              &lt;/div&gt;
                              &lt;div class="row"&gt;
                                      &lt;!-- Bballbreakdown --&gt;
                                      &lt;div class="col-lg-6"&gt;
                                              {% for title, link in cricinfo_posts.items() %}
                                                      &lt;a class="reddit-boxes nounderline list-group-item list-group-item-action" href="{{ link }}"&gt;
                                                              {{ title }} &lt;img class="team-logo" src="/static/images/espncricinfo.png"&gt;
  
                                                      &lt;/a&gt;
                                                      &lt;br&gt;
                                              {% endfor %}
                                      &lt;/div&gt;
                                      &lt;!-- Fansided Nylon Calculus --&gt;
                                      &lt;div class="col-lg-6"&gt;
                                              {% for title, link in cricbuzz_posts.items() %}
                                                      &lt;a class="reddit-boxes nounderline list-group-item list-group-item-action" href="{{ link }}"&gt;
                                                              {{ title }} &lt;img class="team-logo" src="/static/images/cricbuzz.png"&gt;
                                                      &lt;/a&gt;
                                                      &lt;br&gt;
                                              {% endfor %}
                                      &lt;/div&gt;
                                  &lt;/div&gt;
  
                                      &lt;div class="col-lg-6"&gt;
                                              {% for title, link in yahoonews_posts.items() %}
                                                      &lt;a class="reddit-boxes nounderline list-group-item list-group-item-action" href="{{ link }}"&gt;
                                                              {{ title }} &lt;img class="team-logo" src="/static/images/yahoocricnews.png"&gt;
                                                      &lt;/a&gt;
                                                      &lt;br&gt;
                                              {% endfor %}
                                      &lt;/div&gt;
                                      &lt;div class="col-lg-6"&gt;
                                              {% for title, link in bigbash_posts.items() %}
                                                      &lt;a class="reddit-boxes nounderline list-group-item list-group-item-action" href="{{ link }}"&gt;
                                                              {{ title }} &lt;img class="team-logo" src="/static/images/bbl.png"&gt;
                                                      &lt;/a&gt;
                                                      &lt;br&gt;
                                              {% endfor %}
                                      &lt;/div&gt;
                              &lt;/div&gt;
  
  
  
  
                                      &lt;!-- Reddit --&gt;
                                      &lt;div class="row"&gt;
                                          &lt;div class="col-lg-6"&gt;
                                              {% for i in range(1, 10, 2) %}
                                                  &lt;a class="reddit-boxes nounderline list-group-item list-group-item-action" href="https://reddit.com{{ hot_Cricket_posts[i].permalink }}"&gt;
                                                      {{ hot_Cricket_posts[i].title }} &lt;img class="team-logo" src="/static/images/reddit.png"&gt;
                                                  &lt;/a&gt;
                                                  &lt;br&gt;
                                              {% endfor %}
                                          &lt;/div&gt;
                                          &lt;div class="col-lg-6"&gt;
                                              {% for i in range(2, 11, 2) %}
                                                  &lt;a class="reddit-boxes nounderline list-group-item list-group-item-action" href="https://reddit.com{{ hot_Cricket_posts[i].permalink }}"&gt;
                                                      {{ hot_Cricket_posts[i].title }} &lt;img class="team-logo" src="/static/images/reddit.png"&gt;
                                                  &lt;/a&gt;
                                                  &lt;br&gt;
                                              {% endfor %}
                                          &lt;/div&gt;
                                      &lt;/div&gt;
  &lt;/div&gt;
  
  
  
  {% endblock %}
  </code></pre>
  
  <p>sorry for irregular in code structure, any improvement in the code will be appreciated, I looked every '}' in code but I didn't find any wrong syntax.I looked into jinja2 documentation, my code followed every syntax rules as mentioned in  documentation yet I'm getting template syntax error, If you want to know more about the code feel free to ask, thanks.</p>