Hello World: Starting Panda3D: Window closes immediately


I am just starting to explore Panda3d and I want to first try the Hello World tutorial

Unfortunately, when I execute it, I see the window for a short time but then it closes immediately. I understood that the window should remain open until I close it manually.

When I anyway proceed to the second page of the tutorial, I still see a window for a short moment but no scenery in it like intended.

On this computer, I still use Ubuntu 20.04.5 LTS with Python 3.8.10, Panda3D 1.10.13.

After executing python3 main.py, I see the following output:

Known pipe types:
(1 aux display modules not yet loaded.)

What goes wrong here?

Thanks in advance.


Hi, welcome to the forums!

Are you running the program from the command-line? Do you see any other output on the command-line? If so, can you share it? If not, can you share the exit status of the process? This can be obtained by running echo $? immediately after the process exits.

Also make sure that you do have the run() line as last line of the program. Missing this line will cause the program to exit immediately.

Thank you for your reply.

There is no other output than the one I shared. Thank you also for explaining how to check the exit code. I was already thinking that this might help but didn’t know how to do that.

Now watching the code again after a day and seeing your questions about the run()-Call as last line, I right away saw my mistake. The brackets were missing for the run()-Call

I’m also new to Python and still have to get used to leave the ; away in the end of a line, so this time I even omitted the () :sweat_smile:

Thanks again for your time :slight_smile: