Installation Problems: Traceback Error.

I downloaded and ran the installer for Panda3D 1.0.5. When going to run GreatingCard.py IDLE gives me this:

DirectStart: Starting the game.
Traceback (most recent call last):
  File "C:\Panda3D-1.0.5\samples\GreetingCard\GreetingCard.py", line 1, in ?
    import direct.directbase.DirectStart
  File "C:\Panda3D-1.0.5\direct\src\directbase\DirectStart.py", line 3, in ?
    from direct.showbase import ShowBase
  File "C:\Panda3D-1.0.5\direct\src\showbase\ShowBase.py", line 6, in ?
    from pandac.PandaModules import *
  File "C:\Panda3D-1.0.5\pandac\PandaModules.py", line 23, in ?
    exec marshal.loads(zlib.decompress(f.read(1042)))
ValueError: bad marshal data

At first it couldn’t even find the directstart module until I added C:\Panda3D-1.0.5 to my PYTHONPATH env-var.

I am using WinXP and have Python2.3 installed. Any suggestions? Thank you.

After deleting my installation of Python 2.3 and deleting my PYTHONPATH and PYTHON env-var the greeting card script worked. However, I get this message:


DirectStart: Starting the game.
Warning: DirectNotify: category 'Interval' already exists
Known pipe types:
  wglGraphicsPipe
(3 aux display modules not yet loaded.)
:express(warning): Adjusting global clock's real time by -13.3928 seconds.

Is this anything to worry about?

Also I can’t open files direct now. Do I always have to type ppython from the command line. Can I set a PYTHONPATH evn-var pointing to my new python installation in the Panda3D installation?

Those startup messages are normal.

You can tell Windows to re-set the default program to use for opening a .py file. Assuming you’re using Windows XP, the instructions are: right-click on a .py file, pick “Open With…”, click “Browse”, and browse to ppython.exe. If it doesn’t give you an “Open With…” option when you right-click on a .py file, then pick “Open”, and then pick “Select this program from a list”.

David

Thank you for your support.

I have other programs that rely on a full Python installation such as my modeling program, Blender. If I tell them of Panda Python will they recognize it as a normal python installation? I’ve noticed that if I set a PYTHONPATH env-var of where I have Python24 installed then running ppython doesn’t work anymore. Thus I have to delete my env-var, however, then Blender for instance can no longer find Python.

I’m running on WinXP.
I have Python24 installed.
I have no env-vars set.
So far to run a Panda Python program I use a batch file such as below.


@echo "Loading 'loadmesh.py'...please wait."
ppython loadmesh.py
pause

Basically, how can I get panda to work while still letting every other program know of my Python installation? Also, its it for mere convenience, or does Panda need its own custom installation for Python. Ultimately, I would like to run Panda Py files like every other py file on my computer by using a central Python installation.

The problem is that Panda has to be specifically compiled against each different version of Python. As currently shipped, Panda has been pre-compiled to be used against Python 2.2 only. If you want to use it against Python 2.4, you will have to get the code and compile it yourself.

As to your immedate problem, since you are starting Panda with a batch file anyway, why not clear then PYTHON_PATH variable in that batch file?

@echo "Loading 'loadmesh.py'...please wait."
set PYTHON_PATH=
ppython loadmesh.py
pause