It means that volumeNode is not pointing to a node – probably the call to getNode(name) or a similar call failed. You can check this in the python interactor:
Good call- I added print statements for everything up to that and I notice two things.
After print(volumeNode), the interactor just returns an empty line. And after print(volumeNode), the interactor returns “None”. Any pointers for how to fix that?
volumeNode is still not set to a MRML node… Whatever call you are making to assign volumeNode is failing (e.g.: volumeNode = ...), so you need to start there and figure out why.
There’s not much more we can say without some code demonstrating the problem. Please post a short example of what you are doing using data from the Sample Data.