# Reading a vtp file give an error

**URL:** https://discourse.vtk.org/t/reading-a-vtp-file-give-an-error/14998
**Category:** Support
**Created:** [December 11, 2024, 10:13am UTC](https://discourse.vtk.org/t/reading-a-vtp-file-give-an-error/14998 "2024-12-11T10:13:11Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![bardina](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/b/898d66/32.png) [@bardina](https://discourse.vtk.org/u/bardina)
#### Post date: [December 11, 2024, 10:13am UTC](https://discourse.vtk.org/t/reading-a-vtp-file-give-an-error/14998/1 "2024-12-11T10:13:12Z")

</div>

Hi, I am new in this community. I try to read a vtp file, it is a DTC hull which can be read by Paraview.

 ![image](https://discourse.vtk.org/uploads/default/original/2X/b/b5fc311200206d50a1677a4475cab66aa9ae6b03.jpeg)  
I write a python script to read this file 🙂

```auto
import vtk

filename = "hull.vtp"
reader = vtk.vtkXMLPolyDataReader()
reader.SetFileName(filename)
reader.Update()
polydata = reader.GetOutput()

```

but I have an error :

```auto
ERROR: In vtkXMLReader.cxx, line 341
vtkXMLPolyDataReader (000001949E6459B0): Error opening file hull.vtp

ERROR: In vtkExecutive.cxx, line 730
vtkCompositeDataPipeline (0000019484C13260): Algorithm vtkXMLPolyDataReader (000001949E6459B0) returned failure for request: vtkInformation (000001949D6CE050)
  Debug: Off
  Modified Time: 172
  Reference Count: 1
  Registered Events: (none)
  Request: REQUEST_INFORMATION
  FORWARD_DIRECTION: 0
  ALGORITHM_AFTER_FORWARD: 1

```

Maybe someone can help me please ! Thanks a lot

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.vtk.org/user_avatar/discourse.vtk.org/mwestphal/32/19_2.png) [@mwestphal](https://discourse.vtk.org/u/mwestphal)
#### Post date: [December 11, 2024, 10:40am UTC](https://discourse.vtk.org/t/reading-a-vtp-file-give-an-error/14998/2 "2024-12-11T10:40:44Z")

</div>

Hi @bardina

Please share your file.

best,

---

<div class="post-metadata">

### Author: ![bardina](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/b/898d66/32.png) [@bardina](https://discourse.vtk.org/u/bardina)
#### Post date: [December 11, 2024, 10:42am UTC](https://discourse.vtk.org/t/reading-a-vtp-file-give-an-error/14998/3 "2024-12-11T10:42:59Z")

</div>

Sorry, new users can not upload attachments.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.vtk.org/user_avatar/discourse.vtk.org/mwestphal/32/19_2.png) [@mwestphal](https://discourse.vtk.org/u/mwestphal)
#### Post date: [December 11, 2024, 10:45am UTC](https://discourse.vtk.org/t/reading-a-vtp-file-give-an-error/14998/4 "2024-12-11T10:45:21Z")

</div>

In any case, it is probably too big to share here, you can use [wetransfer.com](http://wetransfer.com) instead 🙂

---

<div class="post-metadata">

### Author: ![bardina](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/b/898d66/32.png) [@bardina](https://discourse.vtk.org/u/bardina)
#### Post date: [December 11, 2024, 11:21am UTC](https://discourse.vtk.org/t/reading-a-vtp-file-give-an-error/14998/5 "2024-12-11T11:21:02Z")

</div>

> **[hull.vtp](https://wetransfer.com/downloads/cca81493be5cfecd2de4975b5524591720241211110748/5f1e01?t_exp=1734174468&t_lsid=5ceaf028-d84e-482e-bf8d-ac942468e025&t_network=link&t_rid=ZW1haWx8Njc1OTcyODRkODI3Zjg0MWYyNTE4Y2Fi&t_s=download_link&t_ts=1733915280)**
>
> 1 file sent via WeTransfer, the simplest way to send your files around the world

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.vtk.org/user_avatar/discourse.vtk.org/mwestphal/32/19_2.png) [@mwestphal](https://discourse.vtk.org/u/mwestphal)
#### Post date: [December 11, 2024, 12:56pm UTC](https://discourse.vtk.org/t/reading-a-vtp-file-give-an-error/14998/6 "2024-12-11T12:56:17Z")

</div>

It works well here. How did you install VTK ?

---

<div class="post-metadata">

### Author: ![bardina](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/b/898d66/32.png) [@bardina](https://discourse.vtk.org/u/bardina)
#### Post date: [December 11, 2024, 1:22pm UTC](https://discourse.vtk.org/t/reading-a-vtp-file-give-an-error/14998/7 "2024-12-11T13:22:03Z")

</div>

I have a Windows pc with VSCode and I have write this commands in terminal of VSCode :  
PS C:\Users\amelie\> python -m venv venv  
PS C:\Users\amelie\> .\venv\Scripts\activate  
(venv) PS C:\Users\amelie\> pip install vtk

> > > import vtk

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.vtk.org/user_avatar/discourse.vtk.org/mwestphal/32/19_2.png) [@mwestphal](https://discourse.vtk.org/u/mwestphal)
#### Post date: [December 12, 2024, 8:58am UTC](https://discourse.vtk.org/t/reading-a-vtp-file-give-an-error/14998/8 "2024-12-12T08:58:06Z")

</div>

Understood, more investigation needed to understand why this is happening on your side.
