MantisBT - ParaView
View Issue Details
0015923ParaView(No Category)public2016-01-11 09:012016-07-25 22:16
Paul Melis 
Cory Quammen 
normalminorhave not tried
closedfixed 
5.0 
5.1 
TBD
incorrect functionality
0015923: Syntax error when adding Python Calculator
Steps:
0. This is with the official 5.0.0 Linux 64-bit binaries
1. Start Paraview
2. Add any source (e.g. wavelet, line, load data), press Apply
3. Add a Python Calculator, press Apply

Traceback (most recent call last):
  File "<string>", line 4, in <module>
  File "/home/paulm/software/ParaView-5.0.0-Qt4-OpenGL2-MPI-Linux-64bit/lib/paraview-5.0/site-packages/paraview/calculator.py", line 102, in execute
    retVal = compute(inputs, expression, ns=variables)
  File "/home/paulm/software/ParaView-5.0.0-Qt4-OpenGL2-MPI-Linux-64bit/lib/paraview-5.0/site-packages/paraview/calculator.py", line 74, in compute
    retVal = eval(expression, globals(), mylocals)
  File "<string>", line 0
    
    ^
SyntaxError: unexpected EOF while parsing
No tags attached.
Issue History
2016-01-11 09:01Paul MelisNew Issue
2016-01-11 09:04Paul MelisNote Added: 0035645
2016-06-23 18:42Cory QuammenNote Added: 0036100
2016-06-26 08:06Cory QuammenNote Added: 0036104
2016-06-26 17:09Cory QuammenAssigned To => Cory Quammen
2016-06-26 17:09Cory QuammenStatusbacklog => active development
2016-06-27 13:22Cory QuammenNote Added: 0036113
2016-06-27 13:22Cory QuammenStatusactive development => gatekeeper review
2016-06-27 13:22Cory QuammenFixed in Version => 5.2
2016-06-27 13:22Cory QuammenResolutionopen => fixed
2016-07-25 14:52Cory QuammenStatusgatekeeper review => customer review
2016-07-25 14:52Cory QuammenFixed in Version5.2 => 5.1
2016-07-25 22:16Alan ScottNote Added: 0036590
2016-07-25 22:16Alan ScottStatuscustomer review => closed

Notes
(0035645)
Paul Melis   
2016-01-11 09:04   
Sigh, I'm not paying attention am I...

Okay, so the syntax error is due to not filling in any Python expression.
(0036100)
Cory Quammen   
2016-06-23 18:42   
This is indeed an issue when you have "Auto Apply" on. It should be fixed to handle empty expressions gracefully.
(0036104)
Cory Quammen   
2016-06-26 08:06   
Proposed fix for handling empty expressions is posted at:

https://gitlab.kitware.com/paraview/paraview/merge_requests/852 [^]
(0036113)
Cory Quammen   
2016-06-27 13:22   
Merged in master.
(0036590)
Alan Scott   
2016-07-25 22:16   
Tested master, Linux, local server.