ArsThaumaturgis Beginner Panda Tutorial build closes imediatly

I went through ArsThaumaturgis Beginner Panda3d Tutorial (Home | Panda3D Beginner’s Tutorial) but I’m falling flat at the last step. It builds, but running the exe opens a window of the correct size, black, and then closes without giving an error or any indication of what’s wrong.

I’m using Thonny, with Panda3D installed through Thonny’s built in plug in manager. Everything works when I run the game script in Thonny.

I’ve scrolled through this Errors trying to build distribution post, but his programming enviroment and problems seem different from mine.

It’s building for Windows only.

Building runtime for platform: win_amd64
There are some missing modules: [‘builtin’, ‘_posixsubprocess’]
Copying game files for platform: win_amd64

Followed by a whole bunch of writing .egg.bam messages

Greetings, and welcome to the forum! :slight_smile:

What happens if you run your distributable executable via the command-line/terminal? (Under Windows this would be “cmd”, I believe.) Are any further error messages printed out?

Since the program runs at all, my first guess is that some asset-file has been omitted from the build somehow.

I found it.

my setup.py in the ‘include patterns’ section had .tff, that should be .ttf.

Running it from the windows powershell did not have any errors or messages. I found it by block commenting 99% of the code and then uncommenting chunks till the build didnt run anymore. I do not recommend that method, it’s time consuming and it’s easy to miss a call to function that’s commented out.

A faster way to find a problem like this is to compare the folders and files in the dist with the files and folders in the original. The folder with my font is missing when building with the .tff typo. Which, in retrospect, I should have noticed earlier.

It’s works now, that’s nice. Thank you, it was indeed a file that didnt load. I should probably add something like ‘if loaded-file is none/didnt load, throw an exception/replace with default’ in my code in the future.

1 Like

Ah, I’m glad that you found the problem!

And indeed, it’s not a bad idea to check your various asset folders in cases like this. I believe that there are diff-tools that can compare directories, which can be handy for this purpose. (Under Linux I use “diff” for this; I don’t know what’s available for Windows.)

If you use gui_apps, you must set a log_filename when deploying. Otherwise there will be no way to see any error messages on Windows or macOS. It’s nearly impossible to find the cause of such issues without a log file, whereas it’s usually trivial if you have one.

@Thaumaturge, would you mind updating your tutorial to include a log_filename key in the setup.py, similar to how the setup.py in the asteroids sample is doing so?

And it’s done! :slight_smile:

I would appreciate it if you were to look over the appropriate lesson–lesson 16–and let me know if the relevant additions there are accurate, and whether there are any further issues, please!

1 Like

Looks great, thank you!

1 Like

Not a problem, and thank you for checking–and indeed, for alerting me to the issue! :slight_smile: