# error/warning message using calculator

**URL:** https://discourse.paraview.org/t/error-warning-message-using-calculator/16661
**Category:** ParaView Support
**Created:** [May 19, 2025, 6:30am UTC](https://discourse.paraview.org/t/error-warning-message-using-calculator/16661 "2025-05-19T06:30:15Z")
**Posts on this page:** 2
**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: [May 19, 2025, 6:30am UTC](https://discourse.paraview.org/t/error-warning-message-using-calculator/16661/1 "2025-05-19T06:30:15Z")

</div>

Hello,  
I am getting an warning (and also an error) for using the calculator filter to calculate the momentum of water in a simulation, I am using in a python script the following lines:

```auto
filterForData = Calculator(registrationName='Calculator_momentum.water', Input=filterForData,
                             AttributeType = 'Cell Data',
                             ResultArrayName = 'momentum.water',
                             Function = '"rho.water"*mag("U.water")*"alpha.water"'
                             )

```

the warning I am getting and also error I cite under:

> Warning: In vtkExprTkFunctionParser.cxx, line 426  
> vtkExprTkFunctionParser (0x77c39401bf70): Warn: 0000 Type: [Old Usage] Msg: Possible usage of old format of dot product v1.v2. Please use dot(v1,v2). Expression: "rho.water"_mag(“U.water”)_“alpha.water”

> ERROR: In vtkExprTkFunctionParser.cxx, line 481  
> vtkExprTkFunctionParser (0x77c39401bf70): Err: 0 Type: [Lexer Error] Msg: ERR004 - General token error: "a Expression: "rho.water"_mag(“U.water”)_“alpha.water”

then in paraview I can see correctly that the momentum.water field exist so I wonder why i am getting this error.  
thanks in advance

---

<div class="post-metadata">

### Author: ![cory.quammen](https://discourse.paraview.org/user_avatar/discourse.paraview.org/cory.quammen/32/11193_2.png) [@cory.quammen](https://discourse.paraview.org/u/cory.quammen)
#### Post date: [May 19, 2025, 3:28pm UTC](https://discourse.paraview.org/t/error-warning-message-using-calculator/16661/2 "2025-05-19T15:28:55Z")

</div>

I tried this expression in ParaView 5.13.3. and did not see the same warning or error. What version of ParaView did you see this in?
