How to show assigned user in Print Format in Frappe

Hi All,

I want to show the assigned user (from the _assign field) of a linked Service Request in a Print Format.

I tried this in the Jinja template:

{% set service_request = frappe.get_doc('Service Request', doc.custom_service_request) %}
{% set assigned_list = frappe.parse_json(service_request._assign or '[]') %}
<p>SR Person: {{ assigned_list[0] if assigned_list else '' }}</p>

But it gives a Broken pipe error and the PDF doesn’t load.

Is there a simple way to show the assigned user in a Print Format?