# Unable to read VTU file using OpenDataFile with pvpython

**URL:** https://discourse.paraview.org/t/unable-to-read-vtu-file-using-opendatafile-with-pvpython/14928
**Category:** ParaView Support
**Tags:** python, vtk
**Created:** [June 26, 2024, 9:47am UTC](https://discourse.paraview.org/t/unable-to-read-vtu-file-using-opendatafile-with-pvpython/14928 "2024-06-26T09:47:16Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Leflak](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/l/f6c823/32.png) [@Leflak](https://discourse.paraview.org/u/Leflak)
#### Post date: [June 26, 2024, 9:47am UTC](https://discourse.paraview.org/t/unable-to-read-vtu-file-using-opendatafile-with-pvpython/14928/1 "2024-06-26T09:47:16Z")

</div>

Hello everyone,

I am trying to read a VTU file (which represents the deformation from a numerical simulation) and perform a porosity study by analyzing the amount of void in the 3D object. To do this, I am performing slices at various locations within my object. However, when I attempt to automate the process with pvpython, I am unable to read the CTU file using the OpenDataFile function. It throws an error of the type :

 ![Erreu](https://discourse.paraview.org/uploads/default/original/2X/d/d7eb54ebfc02cfa0b5aaee2de4b992c6a40ee135.png)

Does anyone have an idea why this error is occurring ? I can’t put my vtu file sorry.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [June 26, 2024, 9:49am UTC](https://discourse.paraview.org/t/unable-to-read-vtu-file-using-opendatafile-with-pvpython/14928/2 "2024-06-26T09:49:21Z")

</div>

Hi @Leflak

Without the data it is not realy possible to help you, so you may want to reach out to Kitware to set up a NDA.

> **[Open Source Platforms. Advanced Research Solutions. - Kitware Europe](https://www.kitware.eu/)**
>
> Kitware's mission is to create state-of-the-art software products and services in visualization and data processing using advanced quality software methods.

Best

---

<div class="post-metadata">

### Author: ![Leflak](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/l/f6c823/32.png) [@Leflak](https://discourse.paraview.org/u/Leflak)
#### Post date: [June 26, 2024, 9:55am UTC](https://discourse.paraview.org/t/unable-to-read-vtu-file-using-opendatafile-with-pvpython/14928/3 "2024-06-26T09:55:38Z")

</div>

Thank you for your response,

Actually, there is no confidentiality issue, it’s just that the VTU file is too large. I can send you a smaller file.

Léo.

[mecafe\_58.vtu](https://discourse.paraview.org/uploads/short-url/xWbWuoTUT5z6p0mhkIjRdW6sy2E.vtu) (528 KB)

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [June 26, 2024, 11:15am UTC](https://discourse.paraview.org/t/unable-to-read-vtu-file-using-opendatafile-with-pvpython/14928/4 "2024-06-26T11:15:20Z")

</div>

Ha, this is the classic XML + expat issue

> **[vtkXMLDataParser broken by expat (#4) · Issues · Arch Linux / Packaging /...](https://gitlab.archlinux.org/archlinux/packaging/packages/paraview/-/issues/4)**
>
> Description: As discussed here: https://discourse.paraview.org/t/i-cannot-read-a-vtp-file-i-could-open-yesterday-can-someone-try-to-open-it/13938/8 the arch paraview package, and actually the...

here are the possible solutions:

- Use the binary release from [https://www.paraview.org/download/](https://www.paraview.org/download/)
- Downgrade libexpat to a version \< 2.6.0
- Compile ParaView master yourself
- Wait for ParaView 5.13.0 to be available in your distribution

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [June 26, 2024, 11:16am UTC](https://discourse.paraview.org/t/unable-to-read-vtu-file-using-opendatafile-with-pvpython/14928/5 "2024-06-26T11:16:19Z")

</div>

BTW you seem to be using a very old version of ParaView, please update.

---

<div class="post-metadata">

### Author: ![Leflak](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/l/f6c823/32.png) [@Leflak](https://discourse.paraview.org/u/Leflak)
#### Post date: [June 26, 2024, 11:36am UTC](https://discourse.paraview.org/t/unable-to-read-vtu-file-using-opendatafile-with-pvpython/14928/6 "2024-06-26T11:36:54Z")

</div>

> [@mwestphal](#):
>
> Ha, this is the classic XML + expat issue

OK, I will try. Thank you very much !
