Non-Project Files Protection dialog
This dialog appears when you try to edit non-project files (for example, library sources, external sources, and so on) and protects them against accidental modifications.
One of the typical cases is an attempt to modify a Python file that is placed somewhere with a Python library. PyCharm will protect the library content, restricts editing any file in the related directory, and offers the following options:
Item | Description |
---|---|
These files do not belong to the project | This area displays a non-project file that you are trying to edit. |
I want to edit this file anyway | Select this option to disable protection for the listed files. |
I want to edit all files in this directory | Select this option to disable protection for the listed files and all files in the same directory. |
I want to edit any non-project file in the current session | Select this option to disable protection completely. |
All options are effective during the current session, once the IDE is restarted, protection will be re-enabled. Also, you cannot change your decision for a particular file within the current session.
An obvious solution to overcome file protection is to move the target file into a content root.

In PyCharm, content is a collection of files with which you are currently working, possibly organized in a hierarchy of subfolders. The folder which is the highest in this hierarchy is called the content root folder or content root (shown as ) for short. A project has at least one content root folder, which by default is the project folder itself.