silenoz
silenoz

Reputation: 47

FileNotFoundError: [Errno 2] No such file or directory. Ubuntu

My script is on a server running ubuntu 16.04. I want this script to collect some results in the csv file. 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'

I tried to specify the absolute path (/home/root/folder/tickets.csv), but the error is still the same

tell me what is wrong?

Upvotes: 2

Views: 3165

Answers (1)

silenoz
silenoz

Reputation: 47

the question is closed. having tried the path again '/root/folder' everything worked

Upvotes: 0

Related Questions