我正在阅读python中的一个json文件,其中包含大量的导入商品数据:
import json
with open("data.json") as f:
data = json.load(f)
print(data)
但它显示了这个错误
^{pr2}$现在我得到了这个错误!!!在
Traceback (most recent call last):
File "C:\Users\ALAA\Desktop\hello\dictionary.py", line 2, in <module>
with open("data.json") as f:
FileNotFoundError: [Errno 2] No such file or directory: 'data.json'
你的代码没有很好地缩进
试试这个:
相关问题 更多 >
编程相关推荐