[英]FileNotFoundError: [Errno 2] No such file or directory. Ubuntu
My script is on a server running ubuntu 16.04. 我的脚本在运行ubuntu 16.04的服务器上。 I want this script to collect some results in the csv file.
我希望此脚本在csv文件中收集一些结果。 for this I:
为此,我:
with open('./folder/tickets.csv', 'w', encoding='utf-8') as ouf:
for i in d:
i = str(i)
ouf.write(i + '\n')
as a result, I get an error: FileNotFoundError: [Errno 2] No such file or directory: './folder/tickets.csv' 结果,我得到一个错误:FileNotFoundError:[Errno 2]没有这样的文件或目录:'./folder/tickets.csv'
I tried to specify the absolute path (/home/root/folder/tickets.csv), but the error is still the same 我尝试指定绝对路径(/home/root/folder/tickets.csv),但错误仍然相同
tell me what is wrong? 告诉我怎么了?
the question is closed. 这个问题已经解决。 having tried the path again '/root/folder' everything worked
再次尝试了路径'/ root / folder'一切正常
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.