Email Digest issues list view in digits email

i have to edit email digits but showing some error
what should i do?
my code :fearful:

{% if open_ticket %}

{{ _("Open ticket") }}

{% for t in open_ticket %}
{{ _(t.subject) }} {{ _(t.status) }}

{% endfor %} {% endif %}

Traceback (innermost last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 57, in application
response = frappe.handler.handle()
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 19, in handle
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 36, in execute_cmd
ret =, **frappe.form_dict)
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 806, in call
return fn(*args, **newargs)
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/setup/doctype/email_digest/”, line 370, in get_digest_msg
def onload(self):
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/setup/doctype/email_digest/”, line 99, in get_msg_html
context, is_path=True)
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/”, line 48, in render_template
return get_jenv().get_template(template).render(context)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/jinja2/”, line 989, in render
return self.environment.handle_exception(exc_info, True)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/jinja2/”, line 754, in handle_exception
reraise(exc_type, exc_value, tb)
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/./setup/doctype/email_digest/templates/default.html”, line 45, in top-level template code
{% for t in open_ticket %}
TypeError: ‘long’ object is not iterable

What is open_ticket ?
You cannot use for for long data type.

new issues called open ticket
i want to list top ten open ticket email in digits

Can you please elaborate a little bit more, may be with screenshots so that we understand.

Email Digest Settings

this is my html templet file

I would suggest using Email Alert for this. You might have to add lots of code at the backend for Email Digest.

ok but can you give some example please

i plan to send mail my top 10 issue list ? how could it possiable in this may you help to this code alter