# Attribute error: Object has no attribute 'Background'

**URL:** https://discourse.paraview.org/t/attribute-error-object-has-no-attribute-background/471
**Category:** Development
**Tags:** python
**Created:** [August 24, 2018, 1:38pm UTC](https://discourse.paraview.org/t/attribute-error-object-has-no-attribute-background/471 "2018-08-24T13:38:47Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![kmilo9999](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/k/cc9497/32.png) [@kmilo9999](https://discourse.paraview.org/u/kmilo9999)
#### Post date: [August 24, 2018, 1:38pm UTC](https://discourse.paraview.org/t/attribute-error-object-has-no-attribute-background/471/1 "2018-08-24T13:38:47Z")

</div>

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 
..
..
try:
  view = simple.FindView('RenderView1')
  simple.Render(view)
  view.Background = self.background
except AttributeError:
  traceback.print_exc()

```

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.

---

<div class="post-metadata">

### Author: ![utkarsh.ayachit](https://discourse.paraview.org/user_avatar/discourse.paraview.org/utkarsh.ayachit/32/39_2.png) [@utkarsh.ayachit](https://discourse.paraview.org/u/utkarsh.ayachit)
#### Post date: [August 24, 2018, 1:56pm UTC](https://discourse.paraview.org/t/attribute-error-object-has-no-attribute-background/471/2 "2018-08-24T13:56:16Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![kmilo9999](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/k/cc9497/32.png) [@kmilo9999](https://discourse.paraview.org/u/kmilo9999)
#### Post date: [August 24, 2018, 2:11pm UTC](https://discourse.paraview.org/t/attribute-error-object-has-no-attribute-background/471/3 "2018-08-24T14:11:22Z")

</div>

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

Thanks.
