Error while finding module specification


I decided to change the name of my python project since that I cannot run any module.

I deleted run configuration. Now if I do right click on a file and run, I got the following message:



The configuration looks like:



I found out that if I manually edit the module name to only keep the name of the file (not the full path). The code run correctly, however:

    1) at the end it display the following error message


 2) I still can't debug

The script is executed but the debugger does not stop at breakpoint, at the end I also got an error message:



Reading other posts, I made sure the location of the files is marked as sources-root


I have been using PyCharm for many years this is the first time I have such problems.


Comment actions Permalink

You should use Script path instead of Module name in your run configuration.


Comment actions Permalink

ok thank you, in the meantime I solved my issue by deleting the .idea and recreating a project.

Comment actions Permalink

Perhaps the Template is set to Module name and PyCharm fails to use it correctly. See


Please sign in to leave a comment.