相关疑难解决方法(0)

'dict'对象没有属性'read'

敬启者,

我的代码错误有什么不对?

>>> import json
>>> array = json.load({"name":"Galen","learning objective":"load json files for data analysis"})
Traceback (most recent call last):
  File "<pyshell#1>", line 1, in <module>
    array = json.load({"name":"Galen","learning objective":"load json files for data analysis"})
  File "C:\Python34\lib\json\__init__.py", line 265, in load
    return loads(fp.read(),
AttributeError: 'dict' object has no attribute 'read'
Run Code Online (Sandbox Code Playgroud)

python attributes json

3
推荐指数
1
解决办法
4万
查看次数

标签 统计

attributes ×1

json ×1

python ×1