The open() Function [Errno2]


#1

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!!!!


#2

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.


#3

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


#4

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