packp3d error

Hi,

when I try to use packp3d:

packp3d -o myapp.p3d -d client

I always get this error:

E:\Users\robin\Desktop\ \usb\panda3d\online_game>packp3d -o myapp.p3d -d client
-m client.py
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
    # the code has already been parsed and we can suck out the
  File "c:\python26\lib\modulefinder.py", line 323, in _safe_import_hook
    self._add_badmodule(name, caller)
  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: 'windows'
: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
    # the code has already been parsed and we can suck out the
  File "c:\python26\lib\modulefinder.py", line 323, in _safe_import_hook
    self._add_badmodule(name, caller)
  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: 'windows'
Failure on startup.

E:\Users\robin\Desktop\ \usb\panda3d\online_game>

Hmm, it’s hard to guess precisely what’s going wrong; something in your code appears to be confusing Python’s own modulefinder tool.

But since it’s looking for a module named ‘windows’, maybe it’s something to do with an ‘import windows.foo’ or something like that in your code?

David

I have a Windows.py with a upper W in the same directory. But why is it throwing that error?
Windows is normal imported with import Windows

Are you consistent with your case? Maybe elsewhere in the code you are importing it with a lowercase name.

If that’s not the problem, maybe the name “windows” is a reserved name for something else. Try renaming that module to something different.

David

ok
if fixed that now.
But theres still an error:

    from Bio.PDB.Vector import Vector
ImportError: No module named Bio.PDB.Vector
:TaskManager: TaskManager.destroy()
:display: Closing wglGraphicsWindow
Failure on startup.

Somehow it cant import the bio module. In my program it works. How can I fix that?

What is the Bio module? Is it part of your own code, or is it a third-party tool? Was it mentioned as missing when you ran packp3d?

Maybe you need to add the correct path to find Bio with the -p parameter to packp3d.

David

I just noticed it get these errors (with -p):
its just a pice of it:There are some missing modules: [‘Bio.PDB.mmCIF.MMCIFlex’, ‘_dummy_threading’, ’
_xmlplus’, ‘core.abs’, ‘core.max’, ‘core.min’, ‘core.round’, ‘java.lang’, ‘lib.a
dd_newdoc’, ‘nose’, ‘nose.plugins’, ‘nose.plugins.base’, ‘nose.plugins.builtin’,
‘nose.plugins.errorclass’, ‘nose.tools’, ‘nose.util’, ‘testing.Tester’, ‘win32p
dh’]

‘dumpbin’ is not recognized as an internal or external command,
operable program or batch file.
:stuck_out_tongue:ackager(warning): Unable to determine dependencies from /e/Program Files/Panda
3D-1.7.0/python/Lib/site-packages/numpy/core/_dotblas.pyd
‘mt’ is not recognized as an internal or external command,
operable program or batch file.
:stuck_out_tongue:ackager(warning): Unable to determine dependent assemblies from /e/Program Fil
es/Panda3D-1.7.0/python/Lib/site-packages/numpy/core/_dotblas.pyd
‘dumpbin’ is not recognized as an internal or external command,
operable program or batch file.
:stuck_out_tongue:ackager(warning): Unable to determine dependencies from /e/Program Files/Panda
3D-1.7.0/python/Lib/site-packages/numpy/core/_sort.pyd
‘mt’ is not recognized as an internal or external command,
operable program or batch file.

Hmm, for the missing “numpy” package, you should add “-r numpy” (see the “Standard Packages” page of the Panda3D manual).

The others I’m not familiar with. What are “Bio” and “nose”–are these third-party packages you’ve installed yourself, and that your application depends on?

David

3rd party

Right, well, any third-party modules that aren’t included in the standard library have to be referenced by you with the proper -p directory.

Some or most of the missing modules listed in the error message are not actually problems–Python can’t really tell which modules are truly needed and which aren’t, so it reports everything just to be on the safe side. So, even though you’re getting some missing reports, you might still be OK. You’ll have to run the resulting p3d file and see. If something’s still missing, you’ll have to figure out what it is and add the appropriate path to find it.

But you should definitely add -r numpy to solve the numpy problems.

David

Unknown package sympy, version ""

Did you type “-r sympy”? Is that another package you’re using? I’ve never heard of it, and it’s not one of those listed in the manual as the packages that panda3d.org provides, which is what the error message is telling you.

Or did you just make a typo and mean to type “-r numpy”?

David

Im sorry, numpy works, but I also need sympy and Bio ( biopython.org/wiki/Main_Page ), they dont work. What should I do now?

Use -p to direct packp3d to where you have sympy and Bio installed on your local disk. If they are pure Python modules, that ought to work.

If they include extension modules (compiled C++ code), then you will also need to have Microsoft Visual Studio installed (or at least the free express edition).

David

it still says me:

There are some missing modules: ['Bio.PDB.Vector']

What’s unique about this module? Is there a Vector.py, or is it an extension module like Vector.pyd? Or is it some crazy virtualized thing that doesn’t exist anywhere except at runtime?

If the Bio package is doing some very nonstandard things to locate Vector at runtime, there might be difficulties in packaging it up. It should be possible, but you might have to write some special-case custom code to handle it.

This might become a question for the team that produced the Bio package.

David

Its a vector.py

Is it “vector.py” or “Vector.py”? Case is important in a p3d file. If you’re importing it as Vector, but it’s really called vector, that would explain why it’s not working.

David

Its Vector.py

Should it work automatically with 3rd party packages in the site-packages dir?