我用的是python3,我的加载代码是:
然后报错了,错误信息为:
然后查资料,把data = json.loads(f)换成:
就行了.
理由是load是从文件里面load,loads是从str里面load
参考文献
[1].Python - JSON Load from file not working.https://stackoverflow.com/questions/26072148/python-json-load-from-file-not-working
我用的是python3,我的加载代码是:
然后报错了,错误信息为:
然后查资料,把data = json.loads(f)换成:
就行了.
理由是load是从文件里面load,loads是从str里面load
[1].Python - JSON Load from file not working.https://stackoverflow.com/questions/26072148/python-json-load-from-file-not-working
上一篇:ubuntu 16.04:Couldn't import dot_parser, loading of dot files will not be possible.
下一篇:AttributeError: module 'tensorflow.python.platform.flags' has no attribute 'mark_flag_as_required'
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M