The open() Function [Errno2]


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

this keeps coming up with the error

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

Please Help i need it badly!!!!


hm... that is problematic, we could of course first create the file:

file = open('output.txt', 'w+')
my_file = open("output.txt","r+")

and then opening it for reading.


This thread discusses the same problem. They ultimately fixed the error by altering the text on the text.txt tab!


This could happen if you skipped 1 excercise (had same problem)