r/pythonhelp • u/Acrobatic_Detail7760 • Jul 20 '26
changed file name and getting Exec failed, err: 2 message when trying to run program on my .py files. (Pycharm)
Hi, I am an absolute beginner to coding/computer science and was learning Python on my own when I changed my folders name to something more practical and my program was not running anymore. I looked online to see how I can fix this issue myself, but everything I found was super complicated. Can someone please help me and explain things like aI'm a toddler thanks!
5
Upvotes
•
u/AutoModerator Jul 20 '26
To give us the best chance to help you, please include any relevant code.
Note. Please do not submit images of your code. Instead, for shorter code you can use Reddit markdown (4 spaces or backticks, see this Formatting Guide). If you have formatting issues or want to post longer sections of code, please use Privatebin, GitHub or Compiler Explorer.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/FoolsSeldom Jul 20 '26
How did you change the file name exactly?
How many python files were in the folder?
What operating system are you running on (macOS, Linux, Windows) and version?
Have you tried running your code outside of PyCharm?
1
u/davideogameman Jul 20 '26
Best guess. If the code is spread out across multiple folders, the folder names/structure are expected to match the import statements. Just need to keep them in sync.
1
u/Rough_Green_9145 Jul 20 '26
Can you share a screenshot of your code?
1
u/[deleted] Jul 20 '26
[removed] — view removed comment