# Plotting using \`Trixi2Vtk\` of \`.h5\` files

**URL:** <https://discourse.julialang.org/t/plotting-using-trixi2vtk-of-h5-files/115337>\
**Category:** New to Julia\
**Tags:** question, package, plotting, hdf5\
**Created:** [June 7, 2024, 2:12pm UTC](https://discourse.julialang.org/t/plotting-using-trixi2vtk-of-h5-files/115337 "2024-06-07T14:12:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Devansh1106](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/devansh1106/32/207983_2.png) [@Devansh1106](https://discourse.julialang.org/u/Devansh1106)\
**Post date:** [June 7, 2024, 2:12pm UTC](https://discourse.julialang.org/t/plotting-using-trixi2vtk-of-h5-files/115337/1 "2024-06-07T14:12:24Z")

</div>

I am plotting some `.h5` solution files that are generated from running code similar to `Trixi` package. I am using `Trixi2Vtk` package for plotting.  
Command given in `Trixi` docs is:

```julia
julia> trixi2vtk(joinpath("out", "solution_000000.h5"), output_directory="out")
ERROR: KeyError: key "capacity" not found

```

And I am getting the error. Solution files are in “out” directory. What can be the reason for this error?

---

<div class="post-metadata">

**Author:** ![JoshuaLampert](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joshualampert/32/205964_2.png) [@JoshuaLampert](https://discourse.julialang.org/u/JoshuaLampert)\
**Post date:** [June 9, 2024, 11:54am UTC](https://discourse.julialang.org/t/plotting-using-trixi2vtk-of-h5-files/115337/2 "2024-06-09T11:54:41Z")

</div>

> running code similar to `Trixi` package

Is the `.h5` actually coming from a simulation from Trixi.jl? If not Trixi2Vtk.jl will probably not be able to convert the data into vtk because the `.h5` file needs to have a very special format, which is only written by Trixi.jl itself. In this case, your `.h5` doesn’t seem to contain the key `capacity`, which, however, should be written by Trixi.jl.

---

<div class="post-metadata">

**Author:** ![Devansh1106](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/devansh1106/32/207983_2.png) [@Devansh1106](https://discourse.julialang.org/u/Devansh1106)\
**Post date:** [June 9, 2024, 2:20pm UTC](https://discourse.julialang.org/t/plotting-using-trixi2vtk-of-h5-files/115337/3 "2024-06-09T14:20:30Z")

</div>

In my case `.h5` files are created by a package created on [Trixi.jl](https://juliahub.com/ui/Packages/General/Trixi) with some extension.

Actually I got the solution. Initially, I installed [Trixi2Vtk.jl](https://juliahub.com/ui/Packages/General/Trixi2Vtk) package in `--project=.` environment then it was showing the `key capacity not found error` but if I installed [Trixi2Vtk.jl](https://juliahub.com/ui/Packages/General/Trixi2Vtk) in my base i.e. without using flag `--project=.` then it worked fine and generated the required `.vtu` files.  
Thanks!
