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

来源:互联网 发布:罗德曼生涯数据 编辑:程序博客网 时间:2024/06/05 01:13
story_data = json.loads(self.request.body)

提示TypeError: the JSON object must be str, not ‘bytes’
改为

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

就好了

0 0
原创粉丝点击