Issue when using packp3d with panda3d SDK 1.9.1

Hello all

I am using until now Panda3D SDK 1.8.1 and packp3d with python : it works well.

I have installed this evening Panda3D SDK 1.9.0, it seems that packp3d.exe is replaced by packp3d.py : yes or no ?
:confused:

When I launch the following command to build a p3d package :
C:\Panda3D-1.9.0-x64\python\python.exe C:\Panda3D-1.9.0-x64\direct\p3d\packp3d.py -o C:\Users\philippe\Documents\game\editorV0-1.p3d -d C:\Users\philippe\Documents\game\editor\code -m main.py -n csv -n db -n sql -r sqlite -r morepy -r wx

I got this message :

This script must be run using a version of Panda3D that has been built
for distribution. Try using ppackage.p3d or packp3d.p3d instead.
If you are running this script for development purposes, you may also
set the Config variable panda-package-host-url to the URL you expect
to download these contents from (for instance, a file:// URL).

How to solve this issue ?
:confused:

thanks in advance

Philippe

Note : the error message is raised by Packager.py :

line 2640 if not PandaSystem.getPackageVersionString() or not PandaSystem.getPackageHostUrl():

I just read again the release bulletin for SDK 1.9.0
[url]Panda3D 1.9.0 released!]

Panda3D 1.9.0 released!

Postby rdb » Wed Apr 01, 2015 7:01 pm
Forthcoming:

  • Runtime distributions (no packp3d etc yet)

Do you know when packp3d will be released ?

Thanks

Philippe

Very soon! I’m working on getting something up by the end of the week.

Thank you rdb

Philippe

Hi rdb

Do you know when packp3d will be released for the SDK 1.9.0?

Thank you

Philippe

:slight_smile:

It already has been, as I promised earlier in this thread:

You can download it from runtime.panda3d.org/

Hello rdb

I don’t know how to use all the files available here : runtime.panda3d.org/

Is there an installation procedure ?

Philippe

Just install the Panda3D Runtime, download packp3d1.9.p3d, and run “panda3d.exe packp3d1.9.p3d” in your command prompt. You may have to add the installation directory of the Panda3D Runtime to your system PATH.

Hello RDB

The package p3d is not generated.

I launch this command :

"C:\Program Files (x86)\Panda3D\panda3d.exe" C:\Panda3D-1.9.0-x64\packp3d1.9.p3d -o C:\Users\philippe\Documents\game\editorDevel.p3d -d C:\Users\philippe\Documents\game\editor\code -m main.py -n csv -n db -n sql -r sqlite -r morepy  -r wx -D

The log :

:AppRunner: Total Panda3D disk space used: 576 MB
:AppRunner: Configured max usage is: 2048 MB
:Packager(warning): Unknown package wx, version ""
:Packager(warning): No such file: /c/Users/philippe/Documents/game/editor/code/p3d_info.xml
:Packager(warning): excluded 31 files not marked for inclusion: 'JPG', 'WinMerge', 'egg - Copie', 'gif', 'py~'
:Packager(warning): Cannot build package editorDevel due to missing dependencies: wx

*** Generating editorDevel.p3d with allow_python_dev enabled ***

:AppRunner: Normal exit with status 0.

Sorry, the wx package is not currently supported yet for 1.9, as stated in the linked thread.

Thank you RDB for the quick answer.

Do you plan to do it ?

Philippe

When I use TK the packaging p3d is generated (XP64) . I launch it, the game is working and I can move my character.

"C:\Program Files (x86)\Panda3D\panda3d.exe" C:\Users\philippe\Documents\game\roaming-ralph.p3d

In the game I display a basic tk GUI when i use the key “a” on the keyboard. When I use this key the p3d package crashes.

I got the following error :

Traceback (most recent call last):
  File "C:\buildslave\rtdist-windows-i386\build\built\direct\p3d\AppRunner.py", line 635, in run
  File "C:\buildslave\rtdist-windows-i386\build\built\direct\task\Task.py", line 510, in run
  File "C:\buildslave\rtdist-windows-i386\build\built\direct\task\Task.py", line 467, in step
  File "C:\Users\philippe\Documents\game\editor\test\camera\roaming-ralph\camera-main-tk-V1.py", line 173, in mMove
    self.mMovePlayer()
  File "C:\Users\philippe\Documents\game\editor\test\camera\roaming-ralph\camera-main-tk-V1.py", line 183, in mMovePlayer
    app = simpleapp_tk(None)
  File "C:\Users\philippe\Documents\game\editor\test\camera\roaming-ralph\camera-main-tk-V1.py", line 490, in __init__
    Tkinter.Tk.__init__(self,parent)
  File "C:\thirdparty\win-python\lib\lib-tk\Tkinter.py", line 1810, in __init__
_tkinter.TclError: Can't find a usable init.tcl in the following directories:
    C:/Users/philippe/AppData/Local/Panda3D/hosts/runtime.panda3d.org_0f5faf88846080ae/tk/cmu_1.9/lib/tcl8.5 C:/Users/philippe/AppData/Local/Panda3D/hosts/runtime.panda3d.org_0f5faf88846080ae/panda3d/cmu_1.9/lib/tcl8.5 C:/Users/philippe/AppData/Local/Panda3D/hosts/runtime.panda3d.org_0f5faf88846080ae/panda3d/lib/tcl8.5 C:/Users/philippe/AppData/Local/Panda3D/hosts/runtime.panda3d.org_0f5faf88846080ae/panda3d/cmu_1.9/library C:/Users/philippe/AppData/Local/Panda3D/hosts/runtime.panda3d.org_0f5faf88846080ae/panda3d/library C:/Users/philippe/AppData/Local/Panda3D/hosts/runtime.panda3d.org_0f5faf88846080ae/panda3d/tcl8.5.15/library C:/Users/philippe/AppData/Local/Panda3D/hosts/runtime.panda3d.org_0f5faf88846080ae/tcl8.5.15/library

This probably means that Tcl wasn't installed properly.

It seems that the panda3d.exe search init.tcl in these directories :

C:/Users/philippe/AppData/Local/Panda3D/hosts/runtime.panda3d.org_0f5faf88846080ae/tk/cmu_1.9/lib/tcl8.5
C:/Users/philippe/AppData/Local/Panda3D/hosts/runtime.panda3d.org_0f5faf88846080ae/panda3d/cmu_1.9/lib/tcl8.5
C:/Users/philippe/AppData/Local/Panda3D/hosts/runtime.panda3d.org_0f5faf88846080ae/panda3d/lib/tcl8.5
C:/Users/philippe/AppData/Local/Panda3D/hosts/runtime.panda3d.org_0f5faf88846080ae/panda3d/cmu_1.9/library
C:/Users/philippe/AppData/Local/Panda3D/hosts/runtime.panda3d.org_0f5faf88846080ae/panda3d/library
C:/Users/philippe/AppData/Local/Panda3D/hosts/runtime.panda3d.org_0f5faf88846080ae/panda3d/tcl8.5.15/library
C:/Users/philippe/AppData/Local/Panda3D/hosts/runtime.panda3d.org_0f5faf88846080ae/tcl8.5.15/library

But on my PC init.tcl is located in the following directory :

C:\Users\philippe\AppData\Local\Panda3D\hosts\runtime.panda3d.org_0f5faf88846080ae\tk\cmu_1.9[b]win_i386[/b]\lib\tcl8.5

How to solve this issue ?

Hmm, could you try putting this at the top of your script?

os.environ['TCL_LIBRARY'] = os.path.join(os.environ['TK_ROOT'], 'lib', 'tcl8.5')

Hello RDB

I tried and I got a python error the key “TCL_LIBRARY” does not exist in os.environ.

See attached pictures from the python debugger.


Hello rdb

In the release 1.9.1 : wx or tk are supported ?

When I use wx I got the message

:Packager(warning): Cannot build package roaming-ralph due to missing dependencies: wx

When I use tk i got the same error message : see post above

kind regards

Philippe

Hi -

Wxpython is not supported for Windows in the packaging system at the moment (and not planned right now “It’s something that will happen eventually”) due to huge work involved - see rdb’s answer at [url]Panda3D 1.9 runtime distribution - please test!])

Ok for wx

But for tk ?

kind regards

Philippe

As far as I can see at https://runtime.panda3d.org/tk/cmu_1.9/, it seems (never tested myself) that TK is part of the packages so it should normally work.

Have you used the ‘-r tk’ in the packaging command?

I have opened a bug https://bugs.launchpad.net/panda3d/+bug/1523079

wx packages are now available for 1.9 on Windows. Sorry that it took so long.