Value Error: No JSON object could be decoded


I need to create custom rest APIs in new .py file . It used to work fine is version 7.

But when same used in Latest production VM. It’s giving below error.

Traceback (most recent call last):
  File "/home/frappe/frappe-bench/apps/frappe/frappe/", line 59, in application
  File "/home/frappe/frappe-bench/apps/frappe/frappe/", line 119, in init_request
  File "/home/frappe/frappe-bench/apps/frappe/frappe/", line 127, in make_form_dict
    args = json.loads(
  File "/usr/lib/python2.7/json/", line 339, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python2.7/json/", line 364, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python2.7/json/", line 382, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded

Probably the input json is invalid, please validate it

Can you provide your inputs to api?

Please check the screenshots(merged)

Just tested with a simple GET function

Input should be in json format,
I think you need to select json input in Postman (Body->raw->json (from dropdown))


Thanks, But getting same issue if the function is without parameters.

Is there any issue with of this VM?

Because the older version worked fine with all scenarios.

sorry not sure, I don’t use VM, may be others will reply…

The same problem here Error on Frappe API call (Value Error: No JSON object could be decoded)