PyCharm is no longer recognizing Python files. The interpreter path is correctly set.
To fix this go to Settings or press Ctrl+Alt+S go to Project > Project Interpreter and from the Project Interpreter dropdown select Show All then from the list select the python.exe on its current path and press the + symbol on your right.
Search in the specific file typesFrom the main menu, select Edit | Find | Find in Files Ctrl+Shift+F . In the Find in Files dialog, select the File Mask checkbox and from the list of file types, select the one you need. PyCharm limits its search to the specified type.
Please check File
| Settings
(Preferences
on macOS) | Editor
| File Types
, ensure that file name or extension is not listed in Text files.
To fix the problem remove it from the Text files and double check that .py
extension is associated with Python files.
I had a similar problem where certain .py
files were showing up as regular text files after completion, thus rendering the code without syntax coloring, tab completion features, etc. Through using this post as a starting point for debugging the issue, I found the following:
Recognized File Types
(in my case, Text Files)Registered Patterns
were the names of the files that I was having naming/syntax issues with. I clicked on each of those and then clicked on the -
for each in turn to remove them from the Registered Patterns
list.Apply
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With