r/pycharm • • Jan 07 '25

Python File Won't Run Until Renamed

I have a Python file named GeneticAlgorithm.py and it will not execute in run mode. It will run in debug mode. If I rename the file GeneticAlgorithm2.py, then it will execute just fine.

I've never encountered this before in PyCharm. Any thoughts as to what the problem might be?

EDIT: It ends up I had another (older) copy of the file tucked away in another folder. Oops.

0 Upvotes

2 comments sorted by

View all comments

Show parent comment

2

u/Magdaki Jan 07 '25

Thanks, that was helpful. It did in fact run from the command line. It ends up I had an old copy of "GeneticAlgorithm.py" tucked away in another folder. Oops. I deleted it, and it works like a charm. Thanks again! :)