PDF print Error- Uncaught Server Exception

Sir,

When I am trying to print or save as pdf form print view I am getting the below Uncaught Server Error.

Traceback (most recent call last):
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/website/render.py”, line 34, in render
data = render_page_by_language(path)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/website/render.py”, line 103, in render_page_by_language
return render_page(path)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/website/render.py”, line 119, in render_page
return build(path)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/website/render.py”, line 126, in build
return build_page(path)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/website/render.py”, line 139, in build_page
context = get_context(path)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/website/context.py”, line 19, in get_context
context = build_context(context)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/website/context.py”, line 126, in build_context
if context.title_prefix and context.title and not context.title.startswith(context.title_prefix):
AttributeError: ‘datetime.date’ object has no attribute ‘startswith’

Kindly help.Thank You

Which Form? Can you provide more information for us to replicate?

Cannot replicate in Quotation and Sales Invoice.

Thank you @netchampfaris
In custom doctype when I am put date value in title filed then only this error is showing.Now I am changed my title form date to string type field.