PUT not working with API

hi, im using python requests module and cannot get the PUT to work. The get and post are fine - any ideas??
I’m using the hosted version of ERPNext

Can you share the trace?

See this too: GitHub - frappe/frappe-client: Python library to use Frappe API

Thanks for the reply. How do i get the trace? I have a simple python script i am using for test purposes.

After creating the session to login this is the code i’m using (requests module)

def erp_update(self, data={‘description’ : ‘new todo’}):
headers = {‘Content-type’: ‘application/json’}
endpoint = ‘ToDo/52cbb63b1b’
r = self.sess.put(self.url + endpoint, json=data, headers=headers)

I’ve tried all sorts of variations (with headers/without/different doctypes,etc) but no luck. Keeps returning a 500 reponse

Thanks for the link realised what the issue was, this was the needed syntax:-