packp3d problem

Hi guys,

I am trying to pack my program into a .p3d file. I am not using any modules not already included in panda.
I pack the game without problems into a .p3d file.

when i run that file:

C:\Program files (x86)\Panda3D\panda3d myGame.p3d

i get an error where it says that in a line of my code it failed to convert a string to a float.
I do not have any error messages when i run the software from the python editor, all works fine.

i try to bypass this issue by replacing the float/string conversion by putting a float there directly and then packaged it again.
This is what i get when i try to run it again:

And the cursor keeps blinking and nothing happens, no error message, nothing.
Any ideas why?

LebDev

Are there any log files in the runtime directory?

Hi Rdb,

I looked there, there was nothing but those last 2 lines of my previous post (Apprunner…) nothing else.
What am i doing wrong? I am not getting any error message during packing except the message that other people reported before about missing modules [‘panda3D.core, setuptools’]. Other than that no error message whatsoever.

LebDev

It sounds like it’s not actually running any code in your packed py file, for whatever reason. Usually this happens because you didn’t call any main function, and you don’t have any code at the top level of your main.py file, or something like that.

It also might happen if you have something like:

if __name__ == '__main__':
    run()

in your main file, which won’t do anything if the module name isn’t “main”.

David

Thank you that solved the problem.

LebDev