Pycharm exit code 0

Whenever I run any code, my console always ends with Process finished with exit code 0.

pydev debugger: process 21021 is connecting

Connected to pydev debugger (build 131.618)

Process finished with exit code 0

Solution:

It means that there is no error with your code. You have run it right through and there is nothing wrong with it. Pycharm returns 0 when it has found no errors (plus any output you give it) and returns 1 as well as an error message when it encounters errors.

Editors and scripts do not behave like the interactive terminal, when you run a function it does not automatically show the result. You need to actually tell it to do it yourself.

Generally you just print the results.

If you use print("hello") it should return what you expect with the success message Process finished with exit code 0.

Leave a Reply

Your email address will not be published. Required fields are marked *

9 + 7 =