Can't load egg model on mac

I can’t load my .egg model

I have this error:

Traceback (most recent call last):
File “/Developer/HorrorGame/LevelLoader.py”, line 8, in
model = loader.loadModel(“Models/Pendulum/Pendulum.egg”)
File “/Developer/Panda3D/lib/direct/showbase/Loader.py”, line 169, in loadModel
raise IOError, message
IOError: Could not load model file(s): [‘Models/Pendulum/Pendulum.egg’]

Please help me

There will be a more-specific error message earlier up in the console output; it will either say something like “can’t find model file” or “syntax error in egg file”, which are two different problems.

But I suspect the problem is that it can’t find the model file, because you didn’t give it a full path, and the relative path you gave isn’t rooted on a directory named in your model-path.

Perhaps you just want to add “model-path .” in your Config.prc to ensure the current directory is on your model-path.

David

when I try to open it with pview, I get this:
Known pipe types:
osxGraphicsPipe
(all display modules loaded.)
Loading Pendulum.egg

Error in Pendulum.egg at line 41, column 24:
Pendulum Clock Normal.001 {
^
syntax error

:egg2pg(error): Error reading Pendulum.egg
:loader(error): Couldn’t load file Pendulum.egg: invalid.
Unable to load Pendulum.egg

It looks like the exporter you used to generate .egg files does not handle texture names with spaces correctly. Renaming your textures in your modelling file not to contain spaces should do the trick.

ok thank you :smiley: