500 internal server error when updating a post by id

My apologies. Leaving this here just in case others find the same issue.

Debugging the actual HTTP request sent, I noticed that python was sending the PUT data as "post=raw&post=edit_reason" … replaced data=data with json=data in the requests.put() call and job done.

1 Like