p3d importErrors

Not exactly scripting issues, but some packp3d trouble. Feel free to kick this over to some other forum section if there is a better one.

Trying to run my p3d file, I get this:

So wxwidgets seems to be missing for some reason (It seems very odd that its missing, though the packer does report it as a missing module). So added “-p /Developer/Panda3D/lib” to my build script for packp3d, and now I get this:

I have “-r wx” which prevents a “ImportError: No module named wx” but I don’t know how to deal with an ImportError with no description text. It doesn’t say what’s missing.

My best attempt (with the blank import error), complains about this on packing: There are some missing modules: [‘ElementPath’, ‘_model’, ‘libdirect’, ‘panda3d.core’]

without the “-p /Developer/Panda3D/lib” it lists these:
[’_model’, ‘direct.wxwidgets’, ‘panda3d.core’]

_model is my python extension module, which being a .so file, I understand it showing up in the list, but the other things seem very strange. My project has a package named core at the root level which might impact things, but I don’t see how/why.

I had some nasty import hacks in this project, but those have been removed. (doing so didn’t help these issues)

Hmm. We probably goofed by overlooking direct.wxwidgets in the “wx” package, but I’m not sure why it doesn’t work with the -p /Developer/Panda3D/lib option as you describe. Does it help if you explicitly import wx and sys before you import anything else?

For the record, the missing modules list seems fine. panda3d.core is currently always listed, due to a minor bug in 1.7.0, libdirect.so is one of the Panda extension mdodules, and ElementPath really is absent and is supposed to be.


No it does not help, however, it is now clear that its the wx import thats the problem. A lone import wx line in at the top of my main.py still causes this error.

Edit: My other mac (Snow-leopard instead of leopard) has the same result, but it did download the wx package (I guess I already had it on the other computer).

I get this error with a single file p3d file containing no code other than “import wx”
In linux I seem to get a different import error, no module named wx. My windows machine is being silly, but maybe I can get it to try soon.

It appears we have not properly built the wx package for OSX, and possibly Linux. :frowning:


It doesn’t work on OSX? Odd, I simply installed wxPython by downloading it from the website, in the case of OSX.

That works fine, however its the p3d wx package that does not work. Panda includes a wx package, which it does download if you specify “-r wx” when packing, however it does not work (at lest for osx or linux for me)

That’s what I meant.

I just built a p3d file (in Windows) with “-r wx”, and it works in Windows, but I get a “No module named wx” ImportError in Linux (Ubuntu 10.04). I take it the wx package is still broken?


That is correct.

Is there something I could do to help?

I’d like to be able to distribute a .p3d file to my users, but the one who would find it most useful (because he currently runs my packpanda-generated .exe in a virtual machine, which is slow) is using a Mac.


The next release of Panda3D will probably fix that.
It’s not known yet when it will be released though. In the meantime, you could host your own wx package for OSX, and use that instead of the one at runtime.panda3d.org/ .

This still seems to be a problem on OS X (Snow Leopard). I have Panda 1.7.2 with latest Runtime. The p3d is created but import wx in source results in following error:-

 import wx
  File "VFSImporter", line 446, in load_module
:task(error): Exception occurred in PythonTask Messenger-default
Traceback (most recent call last):
  File "/Users/buildbot/slave/dev_rtdist_osx/build/panda3d/built_cmu/direct/p3d/AppRunner.py", line 636, in run

I have tried packp3d_dev - it simply hangs on the xml content downloader and never creates the p3d.
There is a lot of wxPython code in my project, so ripping it off is not an option - any suggestions on how to get a p3d with wx dependency to work on a Mac?