'NoneType' object has no attribute 'geometry'

   3575   1   0
User Avatar
Member
1 posts
Joined: Aug. 2022
Offline
I'm just starting learning Python in Houdini and trying the python scripts in document to get the geometry of a node, it looks simple and straightforward but I got the error saying ‘Node’ object has no attribute ‘geometry’. Please see the output from the Python Shell window:

Error running callback:
Traceback (most recent call last):
  File "labs::Sop/attribute_value_replace/btnInitializeValues", line 1, in <module>
  File "labs::Sop/attribute_value_replace, PythonModule", line 7, in SetParmValues
AttributeError: 'NoneType' object has no attribute 'geometry'

What I'm I doing wrong here, and how can I fix it?
User Avatar
Member
2658 posts
Joined: June 2008
Offline
Some nodes don't have geometry, such as the NULL. You must be accessing a node with no geometry or the portion of the node that has no geometry. Can't really tell without seeing the code.
Using Houdini Indie 20.5
Windows 11 64GB Ryzen 16 core.
nVidia 3060RTX 12BG RAM.
  • Quick Links