[Newbie] Problem modifying a sample

I am quite the Python newbie :blush:

I started from the roaming Ralph sample. Now, after these lines…

        self.environ = loader.loadModel(MYDIR+"/models/world")      

I added this…

        self.axis = loader.loadModel(MYDIR+"/Models/3Axis") 

I placed the 3Axis.egg into the models directory (I had another file that could load it, so, I know the model file is not corrupt).

I get this error…

Traceback (most recent call last):
  File "Tut-Roaming-Ralph.py", line 261, in ?
    w = World()
  File "Tut-Roaming-Ralph.py", line 74, in __init__
AttributeError: 'NoneType' object has no attribute 'reparentTo'

Any help would be greatly appreciated. I don’t really understand what this error means to begin with.

Thanks in advance

Hi, welcome to the panda forums :slight_smile:

I’m not so experienced (yet ^^) myself, but your problem seems pretty straightforward:

AttributeError: 'NoneType' object has no attribute 'reparentTo' 

NoneType can be seen as a ‘Null object’, which means that


did not come back with your model, which is most likely caused by the capital M in your /Models/ directory.

Good luck!

Usually when a model fails to load, the notifier gives you more information above the final error line. Be sure to check above the error traceback in your console for more information on where your model is (or isn’t :wink:)

Welcome to the forums!

Take care,