Error message "can't find '__main__' module in 'I:/ADDONS/USEEIO/BETA' "

Hello Good people,

I recently installed the pycharm and working on a python project. However, I can't execute anything in the code editor. the error massage says "can't find '__main__' module in 'I:/ADDONS/USEEIO/BETA' "


and the following illustrates the configuration

I was wondering if anyone could help me in this regards.

Warm regards,




Hi Zia,

Is BETA a directory or a file? I'm asking because python files usually have .py extension, but your script path is pointing to BETA. Please ensure that script path in your run configuration is pointing to the correct python file.


Hey Andrey,

I am glad you replied. Yep, its a directory. my project has a number of script files (Python). Which one should I select? Is there any common thing that I can select for the project as a whole. Also, I selected a python file as a script path & hit the run button. It executed without error. Thank you



Ok, glad that it's working. Please note that If you want to run multiple files, you should create separate configuration for each one.


Hey Andery,
Thank you so much for your help. I have another issue. I wanted to know if there is an option to see/get the results from running a chunk of code in editor (similar to Rstudio where the output can be been in a separate window).


Please sign in to leave a comment.