Print format variable does not recognize since yesterday

 <table style="width: 100%;  font-size: small;"  cellpadding="0" cellspacing="0">

{% set i = 0 %}
{% set row0des = “” %}
{% set row0amt = 0.00 %}
{%- for row in doc.taxes -%}
{% if i==0 -%}
{% set row0des = row.description %}
{% set row0amt = row.get_formatted(“tax_amount”,doc) %}
{%- endif %}
{% if i==9 - %}

        <tr>
	  <td style="width: 30%; text-align: right;">{{ row0des }}</td>                      
                <td style="width: 20%; text-align: right;">{{ row0amt }}</td>
      </tr>
     And so on….

{%- endif %}
{% set i = i+1 %}
{%- endfor -%}

Can you explain what you’re trying to do? Maybe post the error you’re facing?

it does not recognize variable i and if condition if i==9 does not true and it does not print taxes. basically there are four columns in table. 1st two columns print description and amount of 5,6,7,8 & 9 rows of taxes and last two columns print 0,1,2,3,4 rows of taxes. It was printing till yesterday noon.

Thanks
Mithilesh

You may have a syntax error here,

{%  if i==9 - %}

it should be:

{% if i==9 -%}

{% if i==9 -%} this is exactly in my code.

bench updated yesterday. Please check.

File “/home/frappe/benches/bench-2017-01-10/apps/frappe/frappe/print/doctype/print_format/print_format.py”, line 30, in validate
validate_template(self.html)
File “/home/frappe/benches/bench-2017-01-10/apps/frappe/frappe/utils/jinja.py”, line 35, in validate_template
frappe.throw(frappe._(“Syntax error in template”))
File “/home/frappe/benches/bench-2017-01-10/apps/frappe/frappe/init.py”, line 309, in throw
msgprint(msg, raise_exception=exc, title=title, indicator=‘red’)
File “/home/frappe/benches/bench-2017-01-10/apps/frappe/frappe/init.py”, line 302, in msgprint
_raise_exception()
File “/home/frappe/benches/bench-2017-01-10/apps/frappe/frappe/init.py”, line 275, in _raise_exception
raise raise_exception, encode(msg)
ValidationError: Syntax error in template

Try to compile the template separately in another python script, and track down the syntax error?