Error on reading a VTK file with multiple scalars

I have got a simple file that associates two sets of values data1 and data2 to the vertices of an unstructured mesh, which I want to display in Paraview.

If I leave out the second set of data, then everything works fine, but with two fields of scalar data, there is an error message.

# vtk DataFile Version 3.0
vtktest
ASCII
DATASET UNSTRUCTURED_GRID
POINTS 4 double
-1 -1 0
-1 1 0
1 -1 0
1 1 0

CELLS 2 8
3 0 1 3
3 0 2 3

CELL_TYPES 2
5
5

POINT_DATA 4
SCALARS data1 double 1
LOOKUP_TABLE default
0.15
0.15
0.45
0.45

POINT_DATA 4
SCALARS data2 double 1
LOOKUP_TABLE default
0.25
0.25
0.75
0.75

Upon calling paraview from the console with that file, the following error message is displayed:

ERROR: In /build/paraview-vlxewD/paraview-5.7.0/VTK/IO/Legacy/vtkDataReader.cxx, line 1007
vtkUnstructuredGridReader (0x55ab1e6bc360): Unsupported point attribute type: point_data for file: /home/username/vtktest.vtk

My ParaView version is (indeed) 5.7 on Ubuntu 20.04.

Do I misunderstand the vtk format, do I need to configure paraview, or this is a bug?

Hi,

I don’t know much about the vtk legacy format, but the following is correct.

# vtk DataFile Version 3.0
vtktest
ASCII
DATASET UNSTRUCTURED_GRID
POINTS 4 double
-1 -1 0
-1 1 0
1 -1 0
1 1 0

CELLS 2 8
3 0 1 3
3 0 2 3

CELL_TYPES 2
5
5

POINT_DATA 4
FIELD FieldData 2
data1 1 4 double
0.15
0.15
0.45
0.45

data2 1 4 double
0.25
0.25
0.75
0.75

You can easily know the format by saving a similar data as a Legacy VTK file in ASCII mode from ParaView.