Syntax error is showing in installation note doctype

I’m getting an error while opening an entry in installation note
It says syntax error
Any idea what that means

default error then share it but if the error is from custom code then debug it and check it one by one.

Ltd.","items":[{"docstatus":0,"doctype":"Installation Note Item","name":"new-installation-note-item-mkizewgtrl","islocal":1,"unsaved":1,"owner":"ruchita@vinayakcorporation.com","parent":"new-installation-note-ztvasjcdqs","parentfield":"items","parenttype":"Installation Note","idx":1,"custom_item_name":"Virgin Coconut Oil","custom_product_code":"Virgin Coconut Oil","item_code":"Item-0029","qty":2}],"inst_date":"2024-10-18","customer":"RAJ FOODS PRODUCTS","customer_address":"RAJ FOODS PRODUCTS-Billing","address_display":"GROUND FLOOR,E/604, E WING, SHATRUNJAY APPARTMENTS, NEW MILL ROAD, TANAJI CHOWK,
KURLA WEST, MUMBAI-400070
MUMBAI
\nMaharashtra
400070
India
\nPhone: +91 9820763131
","contact_person":null,"contact_display":null,"contact_email":null,"contact_mobile":null,"customer_name":"RAJ FOODS PRODUCTS","customer_group":"MAHARASHTRA FOOD","territory":"India"}",
“action”: “Save”
},
“btn”: {
“jQuery3700443950613873206331”: {
“events”: {
“click”: [
{
“type”: “click”,
“origType”: “click”,
“guid”: 7008,
“namespace”: “”
}
]
}
}
},
“freeze”: true,
“headers”: {},
“error_handlers”: {},
“url”: “/api/method/frappe.desk.form.save.savedocs”,
“request_id”: “703890c5-f6d7-425a-b382-c76b6cea0d0f”
}

Response Data

{
“exception”: “SyntaxError: invalid syntax”,
“exc_type”: “SyntaxError”
}
`

App Versions

{
	"erpnext": "15.38.1",
	"frappe": "15.44.1",
	"hrms": "15.31.0",
	"india_compliance": "15.13.3",
	"insights": "2.2.6",
	"payments": "0.0.1",
	"print_designer": "1.4.3"
}

Route

Form/Installation Note/new-installation-note-ztvasjcdqs

Traceback

Traceback (most recent call last):
  File "apps/frappe/frappe/app.py", line 114, in application
    response = frappe.api.handle(request)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/api/__init__.py", line 49, in handle
    data = endpoint(**arguments)
           ^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/api/v1.py", line 36, in handle_rpc_call
    return frappe.handler.handle()
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/handler.py", line 49, in handle
    data = execute_cmd(cmd)
           ^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/handler.py", line 85, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/__init__.py", line 1775, in call
    return fn(*args, **newargs)
           ^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/utils/typing_validations.py", line 31, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/desk/form/save.py", line 39, in savedocs
    doc.save()
  File "apps/frappe/frappe/model/document.py", line 337, in save
    return self._save(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/model/document.py", line 359, in _save
    return self.insert()
           ^^^^^^^^^^^^^
  File "apps/frappe/frappe/model/document.py", line 279, in insert
    self._set_defaults()
  File "apps/frappe/frappe/model/document.py", line 783, in _set_defaults
    new_doc = frappe.new_doc(self.doctype, as_dict=True)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/__init__.py", line 1197, in new_doc
    new_doc = get_new_doc(doctype, parent_doc, parentfield, as_dict=as_dict)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/model/create_new.py", line 22, in get_new_doc
    frappe.local.new_doc_templates[doctype] = make_new_doc(doctype)
                                              ^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/model/create_new.py", line 40, in make_new_doc
    doc = doc.get_valid_dict(sanitize=False)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/model/base_document.py", line 375, in get_valid_dict
    value = frappe.safe_eval(
            ^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/__init__.py", line 2382, in safe_eval
    return safe_eval(code, eval_globals, eval_locals)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/utils/safe_exec.py", line 125, in safe_eval
    _validate_safe_eval_syntax(code)
  File "apps/frappe/frappe/utils/safe_exec.py", line 143, in _validate_safe_eval_syntax
    tree = ast.parse(code, mode="eval")
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/ast.py", line 50, in parse
    return compile(source, filename, mode, flags,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<unknown>", line 2
    Specifications not matching
                       ^^^^^^^^
SyntaxError: invalid syntax

Request Data

{
	"type": "POST",
	"args": {
		"doc": "{\"docstatus\":0,\"doctype\":\"Installation Note\",\"name\":\"new-installation-note-ztvasjcdqs\",\"__islocal\":1,\"__unsaved\":1,\"owner\":\"ruchita@vinayakcorporation.com\",\"naming_series\":\"TA-23-24-\",\"custom_territory_\":\"Territory\",\"custom_business_vertical\":\"\",\"custom_type\":\"\",\"status\":\"Draft\",\"custom_result\":\"\",\"custom_reasons_\":\"\",\"company\":\"Vinayak Ingredients (India) Pvt. Ltd.\",\"items\":[{\"docstatus\":0,\"doctype\":\"Installation Note Item\",\"name\":\"new-installation-note-item-mkizewgtrl\",\"__islocal\":1,\"__unsaved\":1,\"owner\":\"ruchita@vinayakcorporation.com\",\"parent\":\"new-installation-note-ztvasjcdqs\",\"parentfield\":\"items\",\"parenttype\":\"Installation Note\",\"idx\":1,\"custom_item_name\":\"Virgin Coconut Oil\",\"custom_product_code\":\"Virgin Coconut Oil\",\"item_code\":\"Item-0029\",\"qty\":2}],\"inst_date\":\"2024-10-18\",\"customer\":\"RAJ FOODS PRODUCTS\",\"customer_address\":\"RAJ FOODS PRODUCTS-Billing\",\"address_display\":\"GROUND FLOOR,E/604, E WING, SHATRUNJAY APPARTMENTS, NEW MILL ROAD, TANAJI CHOWK,<br> KURLA WEST, MUMBAI-400070<br>MUMBAI<br>\\nMaharashtra<br>400070<br>India<br>\\nPhone: +91 9820763131<br>\",\"contact_person\":null,\"contact_display\":null,\"contact_email\":null,\"contact_mobile\":null,\"customer_name\":\"RAJ FOODS PRODUCTS\",\"customer_group\":\"MAHARASHTRA FOOD\",\"territory\":\"India\"}",
		"action": "Save"
	},
	"btn": {
		"jQuery3700443950613873206331": {
			"events": {
				"click": [
					{
						"type": "click",
						"origType": "click",
						"guid": 7008,
						"namespace": ""
					}
				]
			}
		}
	},
	"freeze": true,
	"headers": {},
	"error_handlers": {},
	"url": "/api/method/frappe.desk.form.save.savedocs",
	"request_id": "703890c5-f6d7-425a-b382-c76b6cea0d0f"
}

Response Data

{
	"exception": "SyntaxError: invalid syntax",
	"exc_type": "SyntaxError"
}

I have tried creating a record with the latest version, and it is working fine. Please try updating your app and then try again.