Traceback (most recent call last):
File "python", line 1, in
IOError: [Errno 2] No such file or directory: 'output.txt'

Oops, try again. Did you create a variable called my_file?

this code passed then i went back and submitted again and now it won't work

my_file = open("output.txt", "r")


Hi @owen358,

That appears to be a bug in the exercise. The output.txt file disappeared for some reason.

Add this to the beginning of your code, so that it first creates the file if it does not yet exist, and then executes the code that you have already written ...

my_file = open("output.txt", "w+")
my_file.write("Norwegian Blue\n")


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.