# What's wrong with my VTU file?

**URL:** https://discourse.vtk.org/t/whats-wrong-with-my-vtu-file/3721
**Category:** Support
**Tags:** file-formats
**Created:** [July 7, 2020, 5:49pm UTC](https://discourse.vtk.org/t/whats-wrong-with-my-vtu-file/3721 "2020-07-07T17:49:04Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![jrwrigh](https://discourse.vtk.org/user_avatar/discourse.vtk.org/jrwrigh/32/2160_2.png) [@jrwrigh](https://discourse.vtk.org/u/jrwrigh)
#### Post date: [July 7, 2020, 5:49pm UTC](https://discourse.vtk.org/t/whats-wrong-with-my-vtu-file/3721/1 "2020-07-07T17:49:04Z")

</div>

When I try to open the following VTK file in Paraview, it says that a reader could not be found. In looking at other forum posts, this probably means that the file format is invalid. However, due to the scarcity of examples out there, I can’t figure out why this file doesn’t work.

```auto
<VTKFile type=”UnstructuredGrid” version="1.0" byte_order="LittleEndian" header_type="UInt32">
    <UnstructuredGrid>
        <Piece NumberOfPoints=”4” NumberOfCells=”2”>
            <PointData Scalars="data">
                <DataArray type="Float32" NumberOfComponents="1" Name="data" format="ascii">
                    0 0.5 0.5 1
                </DataArray>
            </PointData>
            <Points>
                <DataArray type="Float32" Name="coordinates" NumberOfComponents="3" format="ascii">
                0 0 0
                0 1 0
                1 0 0
                1 1 0
                </DataArray>
            </Points>
            <Cells>
                <DataArray type="Int32" Name="connectivity" format="ascii">
                0 2 1
                1 2 3
                </DataArray>
                <DataArray type="Int32" Name="offsets" format="ascii">
                3 6
                </DataArray>
                <DataArray type="UInt8" Name="types" format="ascii">
                5 5
                </DataArray>
            </Cells>
        </Piece>
    </UnstructuredGrid>
</VTKFile>

```

I’ve tried too many variations/edits to count, so I won’t bother listing them. Any idea what’s wrong?

---

<div class="post-metadata">

### Author: ![Sebastien\_Jourdain](https://discourse.vtk.org/user_avatar/discourse.vtk.org/sebastien_jourdain/32/100_2.png) [@Sebastien\_Jourdain](https://discourse.vtk.org/u/Sebastien_Jourdain)
#### Post date: [July 7, 2020, 7:15pm UTC](https://discourse.vtk.org/t/whats-wrong-with-my-vtu-file/3721/2 "2020-07-07T19:15:20Z")

</div>

Should offsets be [3, 3]

---

<div class="post-metadata">

### Author: ![Sebastien\_Jourdain](https://discourse.vtk.org/user_avatar/discourse.vtk.org/sebastien_jourdain/32/100_2.png) [@Sebastien\_Jourdain](https://discourse.vtk.org/u/Sebastien_Jourdain)
#### Post date: [July 7, 2020, 7:17pm UTC](https://discourse.vtk.org/t/whats-wrong-with-my-vtu-file/3721/3 "2020-07-07T19:17:24Z")

</div>

To debug that, I would use paraview, create a cone, clip it so you get an unstructured grid and look at the output format.

---

<div class="post-metadata">

### Author: ![jrwrigh](https://discourse.vtk.org/user_avatar/discourse.vtk.org/jrwrigh/32/2160_2.png) [@jrwrigh](https://discourse.vtk.org/u/jrwrigh)
#### Post date: [July 7, 2020, 8:12pm UTC](https://discourse.vtk.org/t/whats-wrong-with-my-vtu-file/3721/4 "2020-07-07T20:12:05Z")

</div>

Nope, the offsets are correct.

> [@Sebastien\_Jourdain](#):
>
> To debug that, I would use paraview, create a cone, clip it so you get an unstructured grid and look at the output format.

Thanks for the tip. The problem I was having was on copying the data from the VTKBook pdf, the double quote character was incorrect. In the above file you can see the differences between the quotes in `”UnstructuredGrid”` and `version="1.0"`. Note that one is slanted, while the other is neutral.

The incorrect double quote character in Unicode is character `U+201d`, or RIGHT DOUBLE QUOTATION MARK. Whereas the normal double quote character is `U+0022` or, QUOTATION MARK.
