IOError: [Errno 13] Permission denied

后端 未结 3 2126
庸人自扰
庸人自扰 2020-12-19 01:10

I have this piece of code to create a .json file to store python data. When i run it in my server i get this error:

IOError: [Errno 13] Permission denied: \'         


        
3条回答
  •  隐瞒了意图╮
    2020-12-19 02:02

    I have a really stupid use case for why I got this error. Originally I was printing my data > file.txt

    Then I changed my mind, and decided to use open("file.txt", "w") instead. But when I called python, I left > file.txt .....

提交回复
热议问题