Panda3d Couldn't load file models/enviroment.egg: not found on model path

Hi Guys,

Sorry to post question about Panda3D in this Forum, but I have tried the whole day creating a ticket in the Panda3D community Forum and I am not able to login due the system is not forwading a validation code to confirm my id.

Here is the question:

I am working with Python 3.10.10 in Windows 10 and everythings works perfect. I have Mysql, Kivy etc. I decided to test Panda3D and download the latest version (1.10.13) from SDK. It was installed perfect and when I created my main.py file to test everyhing is ok.

‘’’

main.py

from direct.showbase.ShowBase import ShowBase

class MyApp(ShowBase):

def __init__(self):
    ShowBase.__init__(self)

app = MyApp()
app.run()
‘’’

The problem starts when I tried to access the model directory with the following basic code as described int the Panda3D docs (Loading the Grassy Scenery — Panda3D Manual).

‘’’

main.py

from direct.showbase.ShowBase import ShowBase

class MyApp(ShowBase):

def __init__(self):
    ShowBase.__init__(self)

    self.scene = self.loader.loadModel("models/enviroment")
    self.scene.reparentTo(self.render)
    self.scene.setScale(0.25, 0.25, 0.25)
    self.scene.setPos(-8,42,0)

app = MyApp()
app.run()
‘’’

I am receiving the following error message:

‘’’
:loader(error): Couldn’t load file models/enviroment.egg: not found on model path (currently: “/h/doc/python/panda3d;/c/Panda3D-1.10.13-x64/etc/…;/c/Panda3D-1.10.13-x64/etc/…/models”)
Traceback (most recent call last):
File “h:\doc\python\panda3d\main.py”, line 15, in
app = MyApp()
File “h:\doc\python\panda3d\main.py”, line 10, in init
self.scene = self.loader.loadModel(“models/enviroment”)
File “C:\Panda3D-1.10.13-x64\direct\showbase\Loader.py”, line 298, in loadModel
raise IOError(message)
OSError: Could not load model file(s): [‘models/enviroment’]
‘’’

I checked the file Config.rpc in the Panda3D-1.10.13-x64\etc directory and it is look like OK.
‘’’

These specify where model files may be loaded from. You probably

want to set this to a sensible path for yourself. $THIS_PRC_DIR is

a special variable that indicates the same directory as this

particular Config.prc file.

model-path $MAIN_DIR
model-path $THIS_PRC_DIR/…
model-path $THIS_PRC_DIR/…/models
‘’’

I found a question in the Panda3D community, but the user was using Anaconda.

https://discourse.panda3d.org/t/for-tutorial-i-get-error-that-it-could-not-load-model-file/24067

This is not my case. Please, if anyone has any idea let me know.

Regards

Guys,

Problems solved! Closing this ticket. Regards