我有一段代码用于创建一个.json文件来存储Python数据。当我在服务器上运行它时,我收到了以下错误:
IOError: [Errno 13] Permission denied: 'juliodantas2015.json' at line with open(output_file, 'wb') as fp:
Python代码:
fich_input='juliodantas2015.txt'
output_file= fich_input.strip('.txt')+'.json'
import json
with open(output_file, 'wb') as fp:
json.dump('yes', fp)
在命令行中我输入了chmod 777 *.py,但仍然无法工作。我该如何解决?