Search code examples
pycharm

Pycharm project files background red


The issue

Note, this error is not similar to others whereby the letters themselves are in red, this is where the project files have a red background. See the attached image below

enter image description here

I believe that this is because it's not marked as a content root

What I've tried

  1. I've tried to set the code as "project root" but I cannot "mark directory as" on right click or within the menu

  2. Open the code in CLion and do the same as ^

  3. Deleted Pycharm and reinstalled it

  4. Looked in the .xml (I don't really know what I'm doing)

Related issues(?)

I've looked up other issues such as How to stop pycharm show files in project in red color? but they are largely irrelevant to me


Solution

  • The solution was to explicitly open the folder again and this makes the red background go away.

    File->Open->${project folder}