# bug on a VTK opening

**URL:** https://discourse.paraview.org/t/bug-on-a-vtk-opening/15171
**Category:** Development
**Created:** [August 5, 2024, 11:18am UTC](https://discourse.paraview.org/t/bug-on-a-vtk-opening/15171 "2024-08-05T11:18:10Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Bastringue](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/dfb087/32.png) [@Bastringue](https://discourse.paraview.org/u/Bastringue)
#### Post date: [August 5, 2024, 11:18am UTC](https://discourse.paraview.org/t/bug-on-a-vtk-opening/15171/1 "2024-08-05T11:18:10Z")

</div>

Hello,  
I have generated a .vtu file with MEDCoupling9.7 : it is a 3D Cube with 5 nodes for each axis. I can open it with Visit but not with Paraview-5.4.1.  
Very strangely, it works for a 4x4x4 nodes ! And by the way, if I open the 5x5x5 in Visit and export it in VTK, the file becomes correct for Paraview…

The error message is given below.  
I attach the .vtu file and I give the Python MEDCoupling script which has generated it.  
Thank you in advance

```auto
import medcoupling as mc
XCoords=[0.,1.,2.,3.,4.] # provide Nx nodes for x
YCoords=[0.,1.,2.,3.,4.] # provide Ny nodes for y
ZCoords=[0.,1.,2.,3.,4.] # provide Nz nodes for z
arrX=mc.DataArrayDouble(XCoords)
arrY=mc.DataArrayDouble(YCoords)
arrZ=mc.DataArrayDouble(ZCoords)
Cmesh=mc.MEDCouplingCMesh("My3DMesh")
Cmesh.setCoords(arrX,arrY,arrZ)
Umesh=Cmesh.buildUnstructured()
f = Umesh.getMeasureField( True ) 
dummy=mc.MEDCouplingFieldDouble.WriteVTK("Pb_TailleDeListe",[f])

```

[Pb\_TailleDeListe.vtu](https://discourse.paraview.org/uploads/short-url/n7k4DDoCpO1gsuX8XlfsBITBdgV.vtu) (7.3 KB)

paraview Pb\_TailleDeListe.vtu  
ERROR: In /build/paraview-OJ3Fdc/paraview-5.4.1+dfsg4/VTK/IO/XMLParser/vtkXMLParser.cxx, line 399  
vtkXMLDataParser (0x558246625b00): Error parsing XML in stream at line 28, column 0, byte index 995: junk after document element

ERROR: In /build/paraview-OJ3Fdc/paraview-5.4.1+dfsg4/VTK/IO/XML/vtkXMLReader.cxx, line 478  
vtkXMLUnstructuredGridReader (0x55824660d5c0): Error parsing input file. ReadXMLInformation aborting.

ERROR: In /build/paraview-OJ3Fdc/paraview-5.4.1+dfsg4/VTK/Common/ExecutionModel/vtkExecutive.cxx, line 784  
vtkPVCompositeDataPipeline (0x558246612f80): Algorithm vtkXMLUnstructuredGridReader(0x55824660d5c0) returned failure for request: vtkInformation (0x558246669680)  
Debug: Off  
Modified Time: 164020  
Reference Count: 1  
Registered Events: (none)  
Request: REQUEST\_INFORMATION  
ALGORITHM\_AFTER\_FORWARD: 1  
FORWARD\_DIRECTION: 0

---

<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: [August 5, 2024, 11:52am UTC](https://discourse.paraview.org/t/bug-on-a-vtk-opening/15171/2 "2024-08-05T11:52:30Z")

</div>

I was able to open your file without issue in ParaView 5.12.1. ParaView 5.4.1 is quite old at this point - the code writing the VTU file may be writing a newer format that 5.4.1 doesn’t understand.

---

<div class="post-metadata">

### Author: ![Bastringue](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/dfb087/32.png) [@Bastringue](https://discourse.paraview.org/u/Bastringue)
#### Post date: [August 5, 2024, 12:17pm UTC](https://discourse.paraview.org/t/bug-on-a-vtk-opening/15171/3 "2024-08-05T12:17:00Z")

</div>

Thank you Cory for your answer… I will check this as soon as I can install a new version…

---

<div class="post-metadata">

### Author: ![Bastringue](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/dfb087/32.png) [@Bastringue](https://discourse.paraview.org/u/Bastringue)
#### Post date: [August 9, 2024, 8:20pm UTC](https://discourse.paraview.org/t/bug-on-a-vtk-opening/15171/4 "2024-08-09T20:20:58Z")

</div>

Thank you, no more problem indeed with 5.12…
