Hi Paraview Member,
I have the dates for every timestep as a string in a file and I want to link this file to create an annotation where I can see the date instead of the time step. I looked at other sources where this question was already asked, but since I already have the file with the date as a string, I thought I would only need to use the python annotation filter. Unfortunately, I am getting the following error and I can’t understand why it does not recognize the column header as a variable name, even though within the error description it is recognized as so.
I am using Time[t_index] within the expression input of the pythonannotation filter
The error I get is this
Failed to evaluate expression ‘Time[t_index]’. The following exception stack should provide additional developer-specific information. This typically implies a malformed expression. Verify that the expression is valid.
Variables in current scope are [‘Hours’, ‘input’, ‘Time’, ‘Id’, ‘Date’]
Traceback (most recent call last):
File “”, line 7, in
File “”, line 5, in vtkPythonAnnotationFilter_EvaluateExpression
File “C:/Program Files/ParaView 5.6.1/bin\Lib/site-packages\paraview\annotation.py”, line 90, in execute
result = calculator.compute(inputs, expression, ns=ns)
File “C:/Program Files/ParaView 5.6.1/bin\Lib/site-packages\paraview\calculator.py”, line 140, in compute
retVal = eval(expression, globals(), mylocals)
File “”, line 1, in
NameError: name ‘t_index’ is not defined
Thank you for the attention