Packp3D loader error

I’m trying to pack my software with packp3d but when I run the p3d the game window opens for a second then closes. Running works though. Apparently there is a problem loading the models for gui elements. This is what the log file says:

:loader(error): Couldn't load file models/gui/radio_button_gui.bam: not found on model path (currently: "/c/Users/TIMED_~1/AppData/Local/Panda3D/hosts/runtime.panda3d.org_0f5faf88846080ae/panda3d/cmu_1.8;/c/Users/TIMED_~1/AppData/Local/Panda3D/hosts/runtime.panda3d.org_0f5faf88846080ae/ode/cmu_1.8;/c/Users/TIMED_~1/AppData/Local/Panda3D/hosts/runtime.panda3d.org_0f5faf88846080ae/morepy/cmu_1.8;/c/Users/TIMED_~1/AppData/Local/Panda3D/hosts/runtime.panda3d.org_0f5faf88846080ae/models/cmu_1.8;/c/Users/TIMED_~1/AppData/Local/Panda3D/start")

I use the latest version of Panda3D (1.8.1) and the latest Runtime as well. Already tried deleting the runtime cache.

Any ideas?

Ah yes, that looks like an issue that 1.8 had, and that should no longer be present in 1.9, I believe.

In short, 1.8 relied on certain models provided with Panda for certain DirectGUI elements–such as the radio button widget, which seems to be the source of the error in your case.

There are two main solutions, as I recall:

  1. Use the “-r” argument to tell packp3d to include the “models” package (I think that I have that name correct)
  • See this manual page, and the one before it, for more on the “-r” argument, I believe
  1. Copy the relevant model files from your Panda installation folder into your project’s source directory, ensuring that they end up in the appropriate relative path given in the error
  • In the case of the radio button, your error indicates that this should be “/models/gui/radio_button_gui.bam”

Thanks for your fast answer.
I already created the p3d file using the -r parameter but that didn’t change anything.
I’m not sure what you mean by copying the files to my path. My program doesn’t have a file called radio_button_gui.bam and no folder called gui. All my image files are in my program’s source directory in a folder called “image”. I went into Panda’s installation folder and checked the gui folder.
For some reason, there are only two files: dialog_box_gui.egg.pz and radio_button_gui.egg.pz. Is it supposed to be like that? I copied those into my image folder and created a new p3d, but the issue is the same.

Is there an easy way to update Panda? From my experience, updates often break a lot of things and I have a deadline approaching soon (it’s a university project). I’m developing in Eclipse.

Yes, if you’re under a deadline, I would recommend sticking with 1.8.1 instead of upgrading to 1.9.0. 1.9 is not yet quite ready for production.

The easiest way to work around this is manually copying the files to your project, but be sure to do so keeping the “models/gui/” subdirectory structure (don’t just put them in the root of the directory structure).

So, create a directory “models” in your game dir, a subdirectory “gui”, and place the two .egg.pz files you named in there. (I don’t know if you have to run “punzip” on them to get regular .egg files - probably not necessary.)

Thank you so much, it finally worked.