Jinja Template Error

Hi,
I am trying to send an email to a contact using an email template, where i am using doc.first_name
but getting an error, i need

Traceback (most recent call last):
File “/home/ghost/frappe-bench/apps/frappe/frappe/utils/jinja.py”, line 84, in render_template
return get_jenv().from_string(template).render(context)
File “/home/ghost/frappe-bench/env/lib/python3.6/site-packages/jinja2/environment.py”, line 1090, in render
self.environment.handle_exception()
File “/home/ghost/frappe-bench/env/lib/python3.6/site-packages/jinja2/environment.py”, line 832, in handle_exception
reraise(*rewrite_traceback_stack(source=source))
File “/home/ghost/frappe-bench/env/lib/python3.6/site-packages/jinja2/_compat.py”, line 28, in reraise
raise value.with_traceback(tb)
File "

please advise
Thanks

Remove the doc. Just keep it {{ first_name }} and try it.

Alright

Did that work?

It worked with doc.firstname when it was scheduled for another day.
However it gives error if we try to use a template having doc.first_name indivvidually

When using email template, terms and conditions, etc. where jinja can be used in the text editor, you do not need doc. to get the field name. Simply writing the field name like this works: {{ field_name }}

Okay got it…!
Thank you