# Calculator filter in ParaView 5.11.0 produces warnings when called in Python Shell

**URL:** https://discourse.paraview.org/t/calculator-filter-in-paraview-5-11-0-produces-warnings-when-called-in-python-shell/10712
**Category:** ParaView Support
**Tags:** python
**Created:** [November 10, 2022, 9:03am UTC](https://discourse.paraview.org/t/calculator-filter-in-paraview-5-11-0-produces-warnings-when-called-in-python-shell/10712 "2022-11-10T09:03:16Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Venke](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/v/6de8d8/32.png) [@Venke](https://discourse.paraview.org/u/Venke)
#### Post date: [November 10, 2022, 9:03am UTC](https://discourse.paraview.org/t/calculator-filter-in-paraview-5-11-0-produces-warnings-when-called-in-python-shell/10712/1 "2022-11-10T09:03:16Z")

</div>

Hej,  
With Paraview 5.11.0 I get some warnings when calling the calculator filter in the Python Shell. I have tried to inspect the trace and found a difference - but even with this modification the warnings persist. Does someone have an idea how I should modify the code?

Before calling the calculator, I load an xyz-file:

```auto
myfile = VisItXYZReader(FileName='Z:/projects/myfile.xyz')
myfile.Meshes = ['mesh']
myfile.PointArrays.SelectAll()
rv1 = GetActiveViewOrCreate('RenderView')
Disp = Show(myfile, rv1,'GeometryRepresentation')

```

Then I used to call the calculator like this: `calc = Calculator(Input=myfile)`. The trace showed a second input to the function `calc = Calculator(registrationName='Calc', Input=myfile)`.  
Using this in the Python Shell still produces warnings:

```auto
warning: In unknown, line 0
warning: QObject::connect: No such slot pqExpressionsWidget::clear()
warning: In unknown, line 0
warning: QObject::connect: (sender name: 'Clear')
warning: In unknown, line 0
warning: QObject::connect: (receiver name: 'Function')

```

Thanks for your help! Cheers,  
Venke

---

<div class="post-metadata">

### Author: ![spyridon97](https://discourse.paraview.org/user_avatar/discourse.paraview.org/spyridon97/32/11569_2.png) [@spyridon97](https://discourse.paraview.org/u/spyridon97)
#### Post date: [November 10, 2022, 5:47pm UTC](https://discourse.paraview.org/t/calculator-filter-in-paraview-5-11-0-produces-warnings-when-called-in-python-shell/10712/2 "2022-11-10T17:47:20Z")

</div>

Hello @Venke

Thanks for reporting this issue.

Would you mind providing us with your xyz file or another file that reproduces the issue?

---

<div class="post-metadata">

### Author: ![Venke](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/v/6de8d8/32.png) [@Venke](https://discourse.paraview.org/u/Venke)
#### Post date: [November 11, 2022, 7:28am UTC](https://discourse.paraview.org/t/calculator-filter-in-paraview-5-11-0-produces-warnings-when-called-in-python-shell/10712/3 "2022-11-11T07:28:50Z")

</div>

Here is a file. Thanks for your time!  
[import\_aptmoveTest\_visFinalvecs.xyz](https://discourse.paraview.org/uploads/short-url/ohgyJQwJDo5qGHGRHU7TlNul9IJ.xyz) (11.6 KB)  
(Just to be clear: with “I used to call the calculator like this” I meant that this works fine in ParaView 5.10. with the respective files.)

---

<div class="post-metadata">

### Author: ![Venke](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/v/6de8d8/32.png) [@Venke](https://discourse.paraview.org/u/Venke)
#### Post date: [January 12, 2024, 8:16am UTC](https://discourse.paraview.org/t/calculator-filter-in-paraview-5-11-0-produces-warnings-when-called-in-python-shell/10712/4 "2024-01-12T08:16:54Z")

</div>

This may be expected, but just to keep track on this: the issue is the same in ParaView 5.12.0-RC2.

---

<div class="post-metadata">

### Author: ![spyridon97](https://discourse.paraview.org/user_avatar/discourse.paraview.org/spyridon97/32/11569_2.png) [@spyridon97](https://discourse.paraview.org/u/spyridon97)
#### Post date: [January 17, 2024, 11:27am UTC](https://discourse.paraview.org/t/calculator-filter-in-paraview-5-11-0-produces-warnings-when-called-in-python-shell/10712/5 "2024-01-17T11:27:24Z")

</div>

@mwestphal are you potentially familiar with the expression widget?

---

<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: [January 17, 2024, 11:56am UTC](https://discourse.paraview.org/t/calculator-filter-in-paraview-5-11-0-produces-warnings-when-called-in-python-shell/10712/6 "2024-01-17T11:56:28Z")

</div>

I think its a @nicolas.vuaille thing 🙂

---

<div class="post-metadata">

### Author: ![nicolas.vuaille](https://discourse.paraview.org/user_avatar/discourse.paraview.org/nicolas.vuaille/32/5873_2.png) [@nicolas.vuaille](https://discourse.paraview.org/u/nicolas.vuaille)
#### Post date: [January 18, 2024, 8:40am UTC](https://discourse.paraview.org/t/calculator-filter-in-paraview-5-11-0-produces-warnings-when-called-in-python-shell/10712/7 "2024-01-18T08:40:36Z")

</div>

Fortunately, this was some “false positive warning”, as the feature seems to work as expected.

But here is a fix to remove this warning: [https://gitlab.kitware.com/paraview/paraview/-/merge\_requests/6668](https://gitlab.kitware.com/paraview/paraview/-/merge_requests/6668)

This will be incorporated into the 5.12 release.

Thanks for reporting (twice) @Venke !
