Tornado TypeError: the JSON object must be str, not 'bytes'

story_data = json.loads(self.request.body)

报错 TypeError: the JSON object must be str, not 'bytes'

属于编码问题

更改成 

json.loads(self.request.body.decode('utf-8'))

 

posted @ 2018-12-19 15:36  dayezi  阅读(200)  评论(0)    收藏  举报