I/O Files: Lesson 5 Error


#1



https://www.codecademy.com/pt-BR/courses/python-intermediate-pt-BR-g3bps/1/1

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

For some reason, the file "text.txt" is not recognized!


my_file = open("text.txt", "r")
print my_file.readline()
print my_file.readline()
print my_file.readline()
my_file.close()


#2

Hi

This is a bug on our side, which we are trying to fix.
It works if you first edit the text.txt file before submitting the exercise.


#3

It's 7/28, and the bug is still there. It's been 4 months... you guys should really get it fixed.


#4

bug still there - how can I complete the course with this bug preventing me submitting the code?


#5

change to the text.txt tab and add an empty line to the end of the file, this worked for me!


#6

Thanks Darko!

Cheers,

Pete