Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

pycharm

When I try to run any kind of script, I get this error:

screenshot of error message

Transcription of error:

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

like image 488
Patientes Avatar asked Sep 05 '25 16:09

Patientes


2 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
like image 140
Artem Fomenko Avatar answered Sep 10 '25 17:09

Artem Fomenko


Solved by:

  1. Open Edit Configurations....

    enter image description here

  2. Select the desired script

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

    enter image description here

  4. Close "Edit Configurations"

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

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

like image 31
Sergey Polozyuk Avatar answered Sep 10 '25 16:09

Sergey Polozyuk