在我看来,我有:
import csv
outputfile = open("test.csv", 'w')
我收到[Errno 13] Permission Denied
所以我试着打开文件:
outputfile = open("test.csv")
我尝试打开时收到[Errno 2] No such file or directory: 'test.csv'
。
当我使用python manage.py shell
运行相同的代码行时,文件会打开而不会出现错误。 test.csv
与我的观看文件位于同一文件夹中。
为什么我会收到这些错误?如何修复错误?