UserMeli
UserMeli

Reputation: 43

Directory not found in Pycharm when running code

I get an error by running my code in pycharm. I get this message :

C:\Python27\python.exe: can't open file 'C:/Users/Melinda/PycharmProjects/untitled/classParticipant.py': [Errno 2] No such file or directory

Process finished with exit code 2 I understand that I don't have the Folder named untitled, because I have renamed it afterwards as Lab4.enter image description here

Upvotes: 1

Views: 4690

Answers (2)

fahad daniyal
fahad daniyal

Reputation: 269

I wouldn't go that far to delete the project, have a go at going to

Settings -> Project -> Project Structure

and then removing and re-adding the project root.

Upvotes: 2

Dunes
Dunes

Reputation: 40683

You've borked your project by renaming the directory yourself rather than renaming the project from within the IDE.

You need to close and delete the project (do not delete the files when it asks). If you feel unsure about this copy your files to a backup location first. Then reopen the project using "Open" from the file menu.

Upvotes: 2

Related Questions