How to change a file to python file
Answered
in Pycharm Professional, I created a file called "lab06" forgetting the .py extension. Pycharm made this a simple text file. I deleted this file and tried to create a new file called "lab06.py" but this is still treated as a simple text file and not recognized as a python file.
Anyone know why this is the case?
Please sign in to leave a comment.
Hello,
Please try to remove "lab06" from Text file type association in "Settings | Editor | File Types".
Yes, that worked... Thank you!
Had the same issue. Now it is solved. Thanks.
i had to remove my File under "Settings | Editor | File Types | Auto-detect file type by content
I did it but it doesn't work please help me.
i have removed .ask3 from file name patterns but nothing happened.
@Yaroslav Bedrov
Hello Michnikf3,
Please try starting the IDE with default settings as described here https://www.jetbrains.com/help/pycharm/configuring-project-and-ide-settings.html#restore-defaults
Let me know how it works.
I unistalled the program and after I downloaded again. Everything works fine !!!
thanks for your time ~
I had a similar situation but the file was not under "Text" in Settings -> Editor -> File Types, it was under "Auto-detect based on file content". Once I deleted it from there, things worked fine.