Error in "reading" exercise - not such file or directory


I think my code is correct, and I can't figure out what's wrong. The error message I get is:

IOError: [Errno 2] No such file or directory: 'output.txt.'

Here is the code:

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



I got this error for the previous exercise, and writing something in output.txt then deleting it seemed to solve the problem, but it doesn't help here. I tried refreshing and using a different browser but nothing helps.


I got the same error, having written exactly the same.


Hey, I also had this problem. In my case I wrote smth in text.txt, then deleted it, then I clicked 'Save and submit' button while text.txt tab was opened. I got an error message, but then I switched tabs and clicked again 'Save and submit' and it worked.


Thanks, mate, that helped me with the same issue (it happened on the next step though, but that's irrelevant, I guess).


Thanks man! That worked.


wow miraculous how computer errors can be avoided thanks for the tip i was thinking i would never get past that one!



Im surprised they haven't fixed this yet. I feel bad for the beginners who are going to spend hours on this thinking they've done something wrong.


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