Generating .p3d files

Hi all, many thanks for your efforts into providing us with the 1.7.0 version of Panda3D!

Today I installed the SDK and the Runtime (I’m using Windows Vista 32bit; Panda3D is used by my own copy of Python), everythings runs fine, online demos etcetera.
But I don’t seem to be able to generate any .p3d.

When I go to Panda3D-1.7.0\bin and try to run packp3d.exe or ppackage.exe, I get the error “The Panda3D Runtime does not appear to be installed!”.But the runtime’s folder is on the system path AND the online demos are working perfectly.Multiple uninstallations/reinstallations didn’t solve the problem.

I tried downloading and running (note that the file IS executed, so the runtime works) the packp3d.p3d from http://runtime.panda3d.org/packp3d.p3d, but it gave me the following errors:

Traceback (most recent call last):
  File "C:\panda3d-1.7.0\built_cmu\direct\showbase\Messenger.py", line 352, in _
_taskChainDispatch
  File "C:\panda3d-1.7.0\built_cmu\direct\showbase\Messenger.py", line 410, in _
_dispatch
  File "C:\panda3d-1.7.0\built_cmu\direct\p3d\AppRunner.py", line 493, in __star
tIfReady
  File "VFSImporter", line 153, in load_module
  File "/root/pandaworker/panda3d-1.7.0/built_cmu/direct/p3d/packp3d.py", line 2
19, in <module>
  File "/root/pandaworker/panda3d-1.7.0/built_cmu/direct/p3d/packp3d.py", line 2
09, in makePackedApp
  File "/root/pandaworker/panda3d-1.7.0/built_cmu/direct/p3d/Packager.py", line
2352, in endPackage
  File "/root/pandaworker/panda3d-1.7.0/built_cmu/direct/p3d/Packager.py", line
403, in close
  File "/root/pandaworker/panda3d-1.7.0/built_cmu/direct/p3d/Packager.py", line
493, in installMultifile
  File "C:\panda3d-1.7.0\built_cmu\direct\showutil\FreezeTool.py", line 845, in
done
  File "C:\panda3d-1.7.0\built_cmu\direct\showutil\FreezeTool.py", line 919, in
__loadModule
  File "C:\panda3d-1.7.0\built_cmu\direct\showutil\FreezeTool.py", line 1358, in
 load_module
  File "c:\python26\lib\modulefinder.py", line 305, in load_module
    self.scan_code(co, m)
  File "c:\python26\lib\modulefinder.py", line 414, in scan_code
    self._safe_import_hook(name, m, fromlist, level=level)
  File "c:\python26\lib\modulefinder.py", line 323, in _safe_import_hook
    self.import_hook(name, caller, level=level)
  File "c:\python26\lib\modulefinder.py", line 125, in import_hook
    parent = self.determine_parent(caller, level=level)
  File "c:\python26\lib\modulefinder.py", line 162, in determine_parent
    parent = self.modules[pname]
KeyError: 'Extension'
:task(error): Exception occurred in PythonTask Messenger-default
Traceback (most recent call last):
  File "C:\panda3d-1.7.0\built_cmu\direct\p3d\AppRunner.py", line 411, in run
  File "C:\panda3d-1.7.0\built_cmu\direct\task\Task.py", line 496, in run
  File "C:\panda3d-1.7.0\built_cmu\direct\task\Task.py", line 454, in step
  File "C:\panda3d-1.7.0\built_cmu\direct\showbase\Messenger.py", line 352, in _
_taskChainDispatch
  File "C:\panda3d-1.7.0\built_cmu\direct\showbase\Messenger.py", line 410, in _
_dispatch
  File "C:\panda3d-1.7.0\built_cmu\direct\p3d\AppRunner.py", line 493, in __star
tIfReady
  File "VFSImporter", line 153, in load_module
  File "/root/pandaworker/panda3d-1.7.0/built_cmu/direct/p3d/packp3d.py", line 2
19, in <module>
  File "/root/pandaworker/panda3d-1.7.0/built_cmu/direct/p3d/packp3d.py", line 2
09, in makePackedApp
  File "/root/pandaworker/panda3d-1.7.0/built_cmu/direct/p3d/Packager.py", line
2352, in endPackage
  File "/root/pandaworker/panda3d-1.7.0/built_cmu/direct/p3d/Packager.py", line
403, in close
  File "/root/pandaworker/panda3d-1.7.0/built_cmu/direct/p3d/Packager.py", line
493, in installMultifile
  File "C:\panda3d-1.7.0\built_cmu\direct\showutil\FreezeTool.py", line 845, in
done
  File "C:\panda3d-1.7.0\built_cmu\direct\showutil\FreezeTool.py", line 919, in
__loadModule
  File "C:\panda3d-1.7.0\built_cmu\direct\showutil\FreezeTool.py", line 1358, in
 load_module
  File "c:\python26\lib\modulefinder.py", line 305, in load_module
    self.scan_code(co, m)
  File "c:\python26\lib\modulefinder.py", line 414, in scan_code
    self._safe_import_hook(name, m, fromlist, level=level)
  File "c:\python26\lib\modulefinder.py", line 323, in _safe_import_hook
    self.import_hook(name, caller, level=level)
  File "c:\python26\lib\modulefinder.py", line 125, in import_hook
    parent = self.determine_parent(caller, level=level)
  File "c:\python26\lib\modulefinder.py", line 162, in determine_parent
    parent = self.modules[pname]
KeyError: 'Extension'
Failure on startup.

What am I doing wrong?
Also, why is’nt a packp3d.p3d in the SDK, as stated in the manual?

I get similar errors, i think they are cased by having python files in directories that done have init.py in them. See if that helps.

The runtime directory isn’t read from the PATH, but from registry. Are you sure you reinstalled the Runtime version 1.0.0 and not the SDK?

There is, in the Panda3D-1.7.0\bin directory.

About the error claimed by treeform: it seems the packp3d wants every .py in subdirectories to be part of a module.In my first post above, the “Extension” folder it was complaining about contains a setup.py to compile a bunch of .c files into .pyd/.so.Adding a void init.py solved the problem.

@rdb:
Yes, I’m sure I installed the Runtime 1.0.0 from the download section of this site.
I just uninstalled it, cleaned registry with CCleaner for empty keys or errors, and reinstalled the runtime: nothing changed.

Also, I checked the bin directory: i don’t find a packp3d.p3d, but a packp3d.exe instead.

I am having the same issue. When I try to make a .p3d file, I get the message “No such file /c/Panda3D-1.7.0/bin/packp3d.p3d”

I searched all the folders for packp3d.p3d and have found nothing but packp3d.exe.

Right, it’s now called packp3d.exe. Just run that as any other command-line tool.

David

It’s a bug in the 1.7.0 installer. You’ll need to download packp3d.p3d from runtime.panda3d.org/packp3d.p3d , and place it in the bin directory. Then packp3d.exe will work correctly.

After some confusion I was able to locate and download packp3d.p3d file. I’m still having some errors that look fairly cryptic to me. Might anyone have a guess at what I’m doing wrong?

E:\PROGRAMMING\Panda3D-1.7.0\bin>cmd /k packp3d -o myapp.p3d -d E:\Documents and
 Settings\Stephen\My Documents\NetBeansProjects\p3dWindows\src
Traceback (most recent call last):
  File "VFSImporter", line 153, in load_module
  File "C:\panda3d-1.7.0\built_cmu\direct\p3d\AppRunner.py", line 35, in <module
>
  File "VFSImporter", line 153, in load_module
  File "C:\panda3d-1.7.0\built_cmu\direct\showbase\DirectObject.py", line 7, in
<module>
  File "VFSImporter", line 153, in load_module
  File "C:\panda3d-1.7.0\built_cmu\direct\showbase\MessengerGlobal.py", line 5,
in <module>
  File "VFSImporter", line 153, in load_module
  File "C:\panda3d-1.7.0\built_cmu\direct\showbase\Messenger.py", line 8, in <mo
dule>
  File "VFSImporter", line 153, in load_module
  File "C:\panda3d-1.7.0\built_cmu\direct\stdpy\threading.py", line 28, in <modu
le>

  File "VFSImporter", line 153, in load_module
  File "C:\panda3d-1.7.0\built_cmu\pandac\PandaModules.py", line 32, in <module>

  File "VFSImporter", line 153, in load_module
  File "C:\panda3d-1.7.0\built_cmu\pandac\libp3visionModules.py", line 2, in <mo
dule>
  File "C:\panda3d-1.7.0\built_cmu\pandac\extension_native_helpers.py", line 79,
 in Dtool_PreloadDLL
ImportError: DLL load failed: The specified procedure could not be found.
Failure on startup.

E:\PROGRAMMING\Panda3D-1.7.0\bin>

I am having exact the same problem. Can anyone provide a solution to this?

Hmm, I think the use of “cmd /k” is suspicious in the above snippet. You should be able to run packp3d.exe directly (once you have installed packp3d.p3d properly), without having to invoke it via cmd.

Do you get the same problem if you just run packp3d?

David

No, I didn´t invoke it with cmd /k. But maybe it has to do with the fact that I am not using the built-in Python installation of Panda but my own installation set to C:\Python26.
Has this setting ever been tested with generating p3d-files?

packp3d will use its own internal Python, regardless of what version of Python you think you are using. This is important, because the version of Python used to build the p3d file must exactly match the version of Python that is later used to run it (and that version is part of the embedded Panda runtime system).

Still, it does seem like there is some kind of strange DLL conflict inside your runtime. Are you able to run other p3d files that people have produced?

David

Hm, no I tried to run the demos on the website (asteroids.p3d and the like) and they didn´t startup. There is no error message either. I see in the task manager that panda3dw.exe is shortly starting up and then finishing without further notice.

What could be wrong?

Here’s a thought. What happens if you install the Microsoft .NET Framework 2.0?

David

It is already installed along with .NET Framework 1.0.3705, 1.1.4322, 2.0.50727 and 3.0 and 3.5

I can directly run the samples as python files with no problems. They start up and display fine. But pd3 files are not shown.

I’m guessing there will be a similar error message to the above, which will appear in the Panda3D/log/p3dsession.log file after you click on a p3d file. (See The runtime Panda3D directory in the manual.)

Is that the case?

David