Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Renaming project root directory in PyCharm gives java.io.IOException

I know it might be bad idea to rename project root directory, but while doing it I got following error:

enter image description here

I did it as follows:

enter image description here

enter image description here

Cant I really rename project root directory? How this option works? Is their any way to close the project (and all its files) in PyCharms and then rename?

like image 359
anir Avatar asked May 13 '19 07:05

anir


1 Answers

I had the same exception occurring. The java exception indeed indicates that something is using the folder (or contents within the folder). Stupidly, for me this was the python console within PyCharm. Within PyCharm, click on your python console and type exit() and hit enter. Then repeat your previous steps of refactor --> rename and you should be able to rename the directory. Note that the old folder will still be present at the directory it existed with only the .idea folder and files present.

EDIT: This was working last week, but now it randomly fails. Which would seem like something else is keeping the folder or contents occupied. For now it seems that waiting 5 to 10 minutes not doing anything allows renaming. Perhaps PyCharm keeps working on the folder in the background and you wait until it is done with whatever it is doing?

like image 95
ddkvn Avatar answered Oct 08 '22 22:10

ddkvn