[Solved]-Project file window is yellow in PyCharm


What the yellow background usually means is that the files are excluded form the project (it can also mean the files are "read-only").

This might happen for several reasons, the .idea folder might have broken and you need to delete it and recreate the project. If your project is installed in a venv sometimes the source files are marked read-only (which means the source files being edited are the versions installed in the venv).

So here it gets complicated because it can depend on the specifics of the project itself.

My usual steps for this problem are:

  1. Close and reopen the project.

  2. See if marking one of the directories as sources root changes the file color in the project tree. (Files might have been marked as excluded from the project for whatever reason.)

  3. Just to help diagnosing the issue, open a search and go to costum scopes, see what scope those directories are associated with.

  4. Check if file permissions are read-only. This can happen if you logged into PyCharm (or the OS) with a user account that doesn’t have editing permissions on those files.

  5. Delete the .idea folder (so the IDE recreates it) and create a new project with those files. (Remember to make a backup copy.)


To remove yellow colored custom for files : click on project files(>) by scrolling down we can view "Mark directory as", select it thereby you will get "clear exclusion"

Leave a comment