Frappe Rest-API Update Issue

Hi! Im using V12 latest.

When i try to do a PUT using the API i get the following error:

Traceback (most recent call last):\n File \"/home/erpnext/frappe-bench/apps/frappe/frappe/\", line 60, in application\n response = frappe.api.handle()\n File \"/home/erpnext/frappe-bench/apps/frappe/frappe/\", line 84, in handle\n data = json.loads(\n File \"/usr/lib/python3.5/json/\", line 312, in loads\n s.__class__.__name__))\nTypeError: the JSON object must be str, not 'NoneType'\n

Any Idea why this happens?
Best Regards!

I found the issue.

In /apps/frappe/frappe/ line 84:

data = json.loads(

This means the PUT-Request Body has to be a JSON with a field “data” which contains a json.


Nested JSON is really useless. Isn’t it?

I think the line 84 should be replaced with

    if is None:
          data = json.loads(frappe.local.request.get_data())
          data = json.loads(

Best Regards,


I am getting the same issue. is it being fixed yet?
When updating Strings to the database, it is working. however, when passing a JSON object, it will crash, backend python will give an error when excute json.loads(frappe.local.request.get_data()).