500 error cannot deserialize json object - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: Web Scraping & Web Development (https://python-forum.io/forum-13.html) +--- Thread: 500 error cannot deserialize json object (/thread-12915.html) |
500 error cannot deserialize json object - SaiBhargav - Sep-18-2018 Unable to resolve this error while calling API endpoint in flask. Passing the data as json in the POST request. Could someone hep me with the way to resolve this error. My code [def sync_user_direct(self): self.port = 4240 path = 'qrs/usersdirconnect/syncuserdirect' body = {"id": "fba0485e-2f45-4a2f-951c-ef257f469ba8"} print(self.post(path, data=json.dumps(body))) return json.loads(self.post(path, data=json.dumps(body)).decode('utf-8'))]Thanks. |