# Paraview crash when exporting XDMF or VTX files

**URL:** <https://fenicsproject.discourse.group/t/paraview-crash-when-exporting-xdmf-or-vtx-files/13270>\
**Category:** dolfinx\
**Tags:** mesh, io, mpi\
**Created:** [January 10, 2024, 2:13pm UTC](https://fenicsproject.discourse.group/t/paraview-crash-when-exporting-xdmf-or-vtx-files/13270 "2024-01-10T14:13:33Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Jesus\_Vellojin](https://yyz2.discourse-cdn.com/free1/user_avatar/fenicsproject.discourse.group/jesus_vellojin/32/6485_2.png) [@Jesus\_Vellojin](https://fenicsproject.discourse.group/u/Jesus_Vellojin)\
**Post date:** [January 10, 2024, 3:12pm UTC](https://fenicsproject.discourse.group/t/paraview-crash-when-exporting-xdmf-or-vtx-files/13270/5 "2024-01-10T15:12:20Z")

</div>

I’m still facing an error when exporting using VTK. The MWE is as follows.

```auto
# +
from mpi4py import MPI
from dolfinx import fem, io, mesh

# +
msh = mesh.create_rectangle(comm=MPI.COMM_WORLD,
                            points=((0.0, 0.0), (2.0, 1.0)), n=(2, 2),
                            cell_type=mesh.CellType.triangle)
V = fem.functionspace(msh, ("DG", 1))
uh = fem.Function(V)
uh.interpolate(lambda x: x[0])

with io.VTKFile(msh.comm, "out_poisson/poisson.vtk", "w") as file:
    file.write_mesh(msh)
    file.write_function(uh)

```

EDIT: change from VTX to VTK.

---

_[View the full topic](https://fenicsproject.discourse.group/t/paraview-crash-when-exporting-xdmf-or-vtx-files/13270)._
