Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 13 Online
OpenStudy (anonymous):

In problem set 2 hangman, my program was running perfectly last time I checked. I opened it to mess with it some more and now it's telling me "IOError: [Errno 2] No such file or directory: 'words.txt'" which I think means it's not finding the file to get the words out of. It was doing it before but it's not now. Any ideas?

OpenStudy (anonymous):

After ascertained that 'words.txt' is in the same directory with your python code. restart the python idle might be a choose :)

OpenStudy (e.mccormick):

Yah, make sure something did not get deleted, then look at where you are starting the program from. Sometimes a path call can be different if you right click and run vs. open python then open file.

OpenStudy (anonymous):

Agree with the above comment. Make sure that 'words.txt' is in the same directory as the .py file.

OpenStudy (anonymous):

Thanks! I had saved it a different place on accident. :)

OpenStudy (e.mccormick):

That would do it! Have fun.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!