# clean selection without message when run without anything selected

**URL:** https://discourse.paraview.org/t/clean-selection-without-message-when-run-without-anything-selected/17416
**Category:** ParaView Support
**Created:** [January 30, 2026, 3:49pm UTC](https://discourse.paraview.org/t/clean-selection-without-message-when-run-without-anything-selected/17416 "2026-01-30T15:49:53Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![otaolafr](https://discourse.paraview.org/user_avatar/discourse.paraview.org/otaolafr/32/3595_2.png) [@otaolafr](https://discourse.paraview.org/u/otaolafr)
#### Post date: [January 30, 2026, 3:49pm UTC](https://discourse.paraview.org/t/clean-selection-without-message-when-run-without-anything-selected/17416/1 "2026-01-30T15:49:54Z")

</div>

Hello,

I am running a python script that clears selection, creates a selection and then extracts it, lastly clears the selection again.  
it works, but i am having a small annoyance, when running ClearSelection(), if i dont have anything selected, i get the following print (which is annoying as i am printing some debug info during the run)

> ClearSelection() warning: In unknown, line 0 warning: dataChanged() called with an invalid index range: topleft: QModelIndex(-1,-1,0x0,QObject(0x0)) bottomRight:QModelIndex(-1,-1,0x0,QObject(0x0))

is it possible to remove this?

thanks in advance,

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [January 31, 2026, 3:29am UTC](https://discourse.paraview.org/t/clean-selection-without-message-when-run-without-anything-selected/17416/2 "2026-01-31T03:29:56Z")

</div>

Can you share a Python script which shows the problem? I suspect that some method needs to check for valid indices before trying anything with them.

Cc: @cory.quammen @mwestphal

---

<div class="post-metadata">

### Author: ![otaolafr](https://discourse.paraview.org/user_avatar/discourse.paraview.org/otaolafr/32/3595_2.png) [@otaolafr](https://discourse.paraview.org/u/otaolafr)
#### Post date: [February 2, 2026, 6:40am UTC](https://discourse.paraview.org/t/clean-selection-without-message-when-run-without-anything-selected/17416/3 "2026-02-02T06:40:47Z")

</div>

Hello ben,

there is no ‘script’ one can simply create a sphere source filter, select it and in the python terminal copy/paste ClearSelection().

if there is something selected (point/cell), it will deselected (eventhought in the renderViewer will not show up automatically that it was deselected), but if we do extract selection we will not extract anything.

if there is nothing selected, it will spit out this warning error.

just in case here is a super simple script:

```auto
from paraview.simple import *

paraview.simple._DisableFirstRenderCameraReset()

sphere1 = Sphere(registrationName='Sphere1')

UpdatePipeline(time=0.0, proxy=sphere1)
#hit the eye button in the pipeline browser, is there a way to not need to do this!?

ClearSelection() #<- this one will print out the warning message of my post.

SelectCellsThrough(Rectangle=[464, 125, 464, 125], Modifier=None)

ClearSelection() #<- this one will not print out any warning, will 'deselect' the cells that i selected in the previous line

# but the renderviewer will not update (if i do this sequence in the gui, and he cells will show as if they

# are still be selected) it will require a 'Render()' after it

```

regards,  
PS. I am using paraview 6.0.1

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [February 2, 2026, 10:51am UTC](https://discourse.paraview.org/t/clean-selection-without-message-when-run-without-anything-selected/17416/4 "2026-02-02T10:51:29Z")

</div>

> [@otaolafr](#):
>
> there is no ‘script’ one can simply create a sphere source filter, select it and in the python terminal copy/paste ClearSelection().

Unable to reproduce on ParaView 6.0.1 binary release on Linux.

---

<div class="post-metadata">

### Author: ![otaolafr](https://discourse.paraview.org/user_avatar/discourse.paraview.org/otaolafr/32/3595_2.png) [@otaolafr](https://discourse.paraview.org/u/otaolafr)
#### Post date: [February 2, 2026, 10:55am UTC](https://discourse.paraview.org/t/clean-selection-without-message-when-run-without-anything-selected/17416/5 "2026-02-02T10:55:33Z")

</div>

I am in exactly the same version i dont understand.  
steps:

1. ctr+space sphere select source filter sphere
2. apply source filter sphere
3. click on python terminal with the mouse
4. paste ClearSelection() hit enter
5. get the warning

oh! i was re doing as i was surprised and i think i found where it comes from. it is when one has the find data open (view/find data) and runs ClearSelection()

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [February 2, 2026, 10:56am UTC](https://discourse.paraview.org/t/clean-selection-without-message-when-run-without-anything-selected/17416/6 "2026-02-02T10:56:22Z")

</div>

Indeed, I reproduced with the “FindData” widget open.

Please open an issue 🙂

---

<div class="post-metadata">

### Author: ![otaolafr](https://discourse.paraview.org/user_avatar/discourse.paraview.org/otaolafr/32/3595_2.png) [@otaolafr](https://discourse.paraview.org/u/otaolafr)
#### Post date: [February 2, 2026, 1:10pm UTC](https://discourse.paraview.org/t/clean-selection-without-message-when-run-without-anything-selected/17416/7 "2026-02-02T13:10:44Z")

</div>

created: [https://gitlab.kitware.com/paraview/paraview/-/issues/23196](https://gitlab.kitware.com/paraview/paraview/-/issues/23196)
