Error Message when doing the tutorial from the Panda Manual

Hey all,

The code I’m using:

import direct.directbase.DirectStart
 
#Load the first environment model
environ = loader.loadModel("models/environment")
environ.reparentTo(render)
environ.setScale(0.25,0.25,0.25)
environ.setPos(-8,42,0)
#Run the tutorial
run()

The error message I get when trying to run this code:

C:\Panda3D-1.6.2\shard>python testrun.py
DirectStart: Starting the game.
Known pipe types:
  wglGraphicsPipe
(all display modules loaded.)
:display:gsg:glgsg(warning): BlendEquation advertised as supported by OpenGL run
time, but could not get pointers to extension function.
:display:gsg:glgsg(warning): BlendColor advertised as supported by OpenGL runtim
e, but could not get pointers to extension function.
:loader(error): Couldn't load file models/enviroment.egg: not found on model pat
h (currently: "/c/Panda3D-1.6.2/shard;/c/Panda3D-1.6.2/etc/..;/c/Panda3D-1.6.2/e
tc/../models")
Traceback (most recent call last):
  File "testrun.py", line 3, in <module>
    environ = loader.loadModel("models/enviroment")
  File "C:\Panda3D-1.6.2\direct\showbase\Loader.py", line 168, in loadModel
    raise IOError, message
IOError: Could not load model file(s): ['models/enviroment']

C:\Panda3D-1.6.2\shard>

Can someone please help me figure out what is going on?

Maybe your Panda installation got corrupt somehow? Does the file C:\Panda3D-1.6.2\models\environment.egg exist? (It might have .egg.pz extension, dunno)

Yes it does exist:

C:\Panda3D-1.6.2\models\environment.egg.pz

I just noticed something…

I have ‘enviroment’.

The correct spelling is ‘environment’. >.>;

Sorry!

It it working now that I have the correct spelling.

ha ha. i did the same exact thing a few hours ago. new to programming (not really new, its just been a few years), still relearning the ins and outs. :smiley: