python用open 打开文件 报错,一定是bug
# 读取
with open(r'./遍历循环次数.json', 'r', encoding='utf8') as f:
chu_shu_json = json.load(f)
y_2 = chu_shu_json['循环次数'] + 1
print('读取遍历循环次数', y_2 - 1)
with open(r'./遍历循环次数.json', 'r', encoding='utf8') as f:
TypeError: 'numpy.ndarray' object is not callable
居然报这个错,我百世不得琦姐。我把上面代码删了就正常了
为哈。bug,bug?
整个py文件是复制过来的,另一个一切正常。这个报错的py文件在其他代码下有修改。