# Contour error in pyvista

**URL:** https://discourse.paraview.org/t/contour-error-in-pyvista/13984
**Category:** ParaView Support
**Tags:** python
**Created:** [February 22, 2024, 12:26pm UTC](https://discourse.paraview.org/t/contour-error-in-pyvista/13984 "2024-02-22T12:26:14Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Frankx9](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/f/3e96dc/32.png) [@Frankx9](https://discourse.paraview.org/u/Frankx9)
#### Post date: [February 22, 2024, 12:26pm UTC](https://discourse.paraview.org/t/contour-error-in-pyvista/13984/1 "2024-02-22T12:26:14Z")

</div>

Hello,

when trying contour data after compute\_derivative I get an empty dataset even if the value is in the dataset itself.

`soln` is correctly populated with the various arrays but the contour filter is failing no matter which value I try to get an isosurface of.

```auto
soln = pv.get_reader(filename).read() 
soln = soln.compute_derivative(scalars="velocity", qcriterion=True, gradient=False, faster=True, preference="point") 
qcontour = soln.contour(np.array([100]), scalars="qcriterion")

```

The issue seems to lay in faster flag, when set to False it works as expected.

How can I try to troubleshoot this?

Best regards

---

<div class="post-metadata">

### Author: ![cory.quammen](https://discourse.paraview.org/user_avatar/discourse.paraview.org/cory.quammen/32/11193_2.png) [@cory.quammen](https://discourse.paraview.org/u/cory.quammen)
#### Post date: [February 22, 2024, 12:49pm UTC](https://discourse.paraview.org/t/contour-error-in-pyvista/13984/2 "2024-02-22T12:49:50Z")

</div>

Hi @Frankx9, you will likely have better luck getting help over at the [PyVista support page](https://github.com/pyvista/pyvista/discussions). PyVista and ParaView are both related to VTK, but ParaView they are separate projects.

---

<div class="post-metadata">

### Author: ![Frankx9](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/f/3e96dc/32.png) [@Frankx9](https://discourse.paraview.org/u/Frankx9)
#### Post date: [February 22, 2024, 5:53pm UTC](https://discourse.paraview.org/t/contour-error-in-pyvista/13984/3 "2024-02-22T17:53:19Z")

</div>

Hi @cory.quammen,

I’ve asked them as well but checking their source code there is nothing strange on their side, they’re calling

```auto
alg = _vtk.vtkContourFilter()

```

but when the input array is processed with :

```auto
alg = _vtk.vtkGradientFilter()
...
alg.SetFasterApproximation(faster)

```

the contour fails if faster approximation is required

Do you have any further insight on vtk side?

Best regards

---

<div class="post-metadata">

### Author: ![cory.quammen](https://discourse.paraview.org/user_avatar/discourse.paraview.org/cory.quammen/32/11193_2.png) [@cory.quammen](https://discourse.paraview.org/u/cory.quammen)
#### Post date: [July 7, 2025, 2:28pm UTC](https://discourse.paraview.org/t/contour-error-in-pyvista/13984/4 "2025-07-07T14:28:34Z")

</div>

> [@Frankx9](#):
>
> the contour fails if faster approximation is required

As a workaround, you can turn off the `faster` option.

To get more insight into this issue, we would need a dataset. Can you post one?
