"Interpret values as categories" not working for string properties (PV 5.11.0 RC2)

Hi there,

I have a unstructured vtk mesh with certain “group” labels as strings for the cells. When I try to color the plot by these labels using the “Interpret values as categories”, the legend shows the correct categories in the model, but the whole model has the “NaN”-color.

If I am not hallucinating, this used to work in earlier versions (pre 5.10). I also cannot extract these cells based on the group property:

  File "C:\Program Files\ParaView 5.11.0\bin\Lib\site-packages\paraview\detail\python_selector.py", line 90, in execute
    raise RuntimeError(
RuntimeError: Expression '(Group == "Brick1")' did not produce a valid mask array. The value produced is of the type '<class 'bool'>'. This typically implies a malformed expression. Verify that the expression is valid

Here is an attached simplified vtk file with this problem:
test.vtu (2.1 KB)

Thanks! :slight_smile:

Hi @wtfermi !

The selection editor have changed a lot between 5.10 and 5.11. So there is perhaps a regression here.

Maybe @spyridon97 would have time to look at it?

Otherwise, you can open an issue at: https://gitlab.kitware.com/paraview/paraview/-/issues



@Francois_Mazen why do you think that the selection editor is relevant to this?

@cory.quammen would you like me to look into this?

The second part of the message with the extract selection triggers a crash in vtkSelection, so it reminded me your expertise with the selection editor (sorry if I am wrong):

1   ??                                                                                                                      0x7ffff7e6364c 
2   raise                                                                                                                   0x7ffff7e13958 
3   abort                                                                                                                   0x7ffff7dfd53d 
4   ??                                                                                                                      0x7ffff7dfd45c 
5   __assert_fail                                                                                                           0x7ffff7e0c486 
6   vtkGenericDataArray<vtkAOSDataArrayTemplate<signed char>, signed char>::Resize vtkGenericDataArray.txx              432 0x7fffedf7b950 
7   vtkAbstractArray::SetNumberOfValues                                            vtkAbstractArray.cxx                 211 0x7fffedf9876b 
8   vtkSelection::Evaluate                                                         vtkSelection.cxx                     753 0x7fffefdf63c6 
9   vtkSelection::Evaluate<std::map<std::string, vtkSignedCharArray *>>            vtkSelection.h                       257 0x7fffdd224d4f 
10  vtkExtractSelection::EvaluateSelection                                         vtkExtractSelection.cxx              506 0x7fffdd20bd69 
11  vtkExtractSelection::RequestData                                               vtkExtractSelection.cxx              427 0x7fffdd20b678 
12  vtkPVExtractSelection::RequestData                                             vtkPVExtractSelection.cxx            127 0x7fffdc870067 
13  vtkDataObjectAlgorithm::ProcessRequest                                         vtkDataObjectAlgorithm.cxx           87  0x7ffff067dde2 
14  vtkExecutive::CallAlgorithm                                                    vtkExecutive.cxx                     735 0x7ffff068a63d 
15  vtkDemandDrivenPipeline::ExecuteData                                           vtkDemandDrivenPipeline.cxx          462 0x7ffff06809ca 
16  vtkCompositeDataPipeline::ExecuteData                                          vtkCompositeDataPipeline.cxx         163 0x7ffff0673bc9 
17  vtkDemandDrivenPipeline::ProcessRequest                                        vtkDemandDrivenPipeline.cxx          261 0x7ffff067ff77 
18  vtkStreamingDemandDrivenPipeline::ProcessRequest                               vtkStreamingDemandDrivenPipeline.cxx 344 0x7ffff07d6aee 
19  vtkCompositeDataPipeline::ForwardUpstream                                      vtkCompositeDataPipeline.cxx         733 0x7ffff0676e95 
20  vtkDemandDrivenPipeline::ProcessRequest                                        vtkDemandDrivenPipeline.cxx          247 0x7ffff067fe6d 
... <plus>                                                                                                                                 

I see, i need to explore it then.

The second issue can not be resolved, because a vtkStringArray can not be mapped to a numpy array which is used by the python selector which is used by the Find Data Panel. But i will make it not crash.

The first issue seems to have been introduced on 5.11. I checked 5.10 and 5.9 and it was working just fine. I will explore what happened.