Pycharm gives error in box when i try to execute code

Viewed 1187

When i try to run any kind of script, i get this error.

1

transcription of error:

Argument for @NotNull parameter 'module' of com/intellij/openapi/roots/ModuleRootManager.getInstance must not be null

3 Answers

Same in IntelliJ IDEA 2022.2 (Ultimate Edition) Build #IU-222.3345.118, built on July 26, 2022 with plugin Python (222.3345.131).

Solved by:

  1. Switch "Python interpreter:" to "Use SDK of module:" in "Run/Debug Configurations"
  2. Run and stop script
  3. Switch "Python interpreter:" back to "Use specified interpreter:" (I use Virtualenv)
  4. Run script

Solved by:

  1. Open Edit Configurations....

enter image description here

  1. Select the desired script

  2. Click on the button "-" (Tip "Remove Configuration")

enter image description here

4) Close "Edit Configurations"

  1. Select the desired script on left panel (Where your project files)

  2. Click Right mouse and select "Run ..."

Just open Edit Configuration and click apply and click run

Related