ValueError: First non keyword argument must be a string or dict

Hi All,

I’m trying to create Doc using below code:

doc = frappe.new_doc(“Stock Requisition”)
doc.update(newJson_transfer)
doc.submit()
Getting error : ValueError: First non keyword argument must be a string or dict
Any changes required?

Thanks,
Raghu.

Any resolution?

I receive this error on version 14 when trying to submit a purchase invoice. Any help is appreciated.

What kind of Json parameter pass in?

create a new document

doc = frappe.new_doc('DocType Name')
doc.title = 'set Title of it'
doc.insert()