Attribute error: Object has no attribute 'Background'

Hi all,

So, I’m trying to modify the background of my view. This is part of my python code:

from paraview import simple, servermanager 
  view = simple.FindView('RenderView1')
  view.Background = self.background
except AttributeError:

and it prints:
Attribute error: ‘NoneType’ Object has no attribute ‘Background’

Any thoughts on this?

I am compiling against paraview web 3.2.2.

I appreciate your help.

Looks like there’s no view of the name RenderView1 in your scene, that’s why view is None. Try calling GetViews to get a list of views created. If not empty, then you may be just using a incorrect name.

Yes! Silly me.
Actually I posted a simplified version of the code. It was looking for a non existent view.