# ParaView state file problem: state file does not show a slice from a dataset

**URL:** https://discourse.paraview.org/t/paraview-state-file-problem-state-file-does-not-show-a-slice-from-a-dataset/9114
**Category:** ParaView Support
**Created:** [March 4, 2022, 1:59pm UTC](https://discourse.paraview.org/t/paraview-state-file-problem-state-file-does-not-show-a-slice-from-a-dataset/9114 "2022-03-04T13:59:02Z")
**Posts on this page:** 17
**Page:** 1

<div class="post-metadata">

### Author: ![callista](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/c/c68b51/32.png) [@callista](https://discourse.paraview.org/u/callista)
#### Post date: [March 4, 2022, 1:59pm UTC](https://discourse.paraview.org/t/paraview-state-file-problem-state-file-does-not-show-a-slice-from-a-dataset/9114/1 "2022-03-04T13:59:02Z")

</div>

Hello eveyrone,  
I’ve made a pvsm state and when I load the state, this slice I’ve made is not shown in the View. When I have a dataset without modifications or filters applied everything works fine, but as soon as I do Slice or Clip this issue arises. There is a message as well in the output message box. Can someone suggest where to look for a problem?

 ![Screenshot from 2022-03-04 14-42-59](https://discourse.paraview.org/uploads/default/original/2X/6/6db0155f6895a1c135eee9cb30c9d9507b187283.jpeg)

---

<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: [March 4, 2022, 2:45pm UTC](https://discourse.paraview.org/t/paraview-state-file-problem-state-file-does-not-show-a-slice-from-a-dataset/9114/2 "2022-03-04T14:45:53Z")

</div>

please share data and steps to repro

---

<div class="post-metadata">

### Author: ![callista](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/c/c68b51/32.png) [@callista](https://discourse.paraview.org/u/callista)
#### Post date: [March 4, 2022, 4:11pm UTC](https://discourse.paraview.org/t/paraview-state-file-problem-state-file-does-not-show-a-slice-from-a-dataset/9114/4 "2022-03-04T16:11:00Z")

</div>

@mwestphal Can I send you data via email?

And the steps:

1. Firstly load vtu.series file and use XML poly data reader
2. Load 3d velocity netcdf file using NETCDF reader, uncheck spherical coordinates, check fill value with none and switch output type from automatic to image
3. Calculate velocity vector by using Calculator filter (u_iHat+v_jHat+w\*kHat)
4. Make a slice of the velocity vector data
5. Programmable filter:  
the code :  
from datetime import datetime, timedelta  
t = inputs[0].GetInformation().Get(vtk.vtkDataObject.DATA\_TIME\_STEP())  
time\_origin = datetime.strptime(“2019-07-25 00:00:00”, “%Y-%m-%d %H:%M:%S”)  
humantime = time\_origin + timedelta(seconds=t)

to = self.GetTableOutput()  
arr = vtk.vtkStringArray()  
arr.SetName(“humantime”)  
arr.SetNumberOfComponents(1)  
arr.InsertNextValue("{}".format(humantime.strftime("%Y-%m-%d %H:%M:%S")))  
to.AddColumn(arr)

Switch the output dataset type to vtkTable  
6. Annotate Attribute Data apply this and switch to humantime in Select Input Array  
and apply and save this as a pvsm file.  
and when I try to load again I don’t see the slice at all

---

<div class="post-metadata">

### Author: ![callista](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/c/c68b51/32.png) [@callista](https://discourse.paraview.org/u/callista)
#### Post date: [March 4, 2022, 4:29pm UTC](https://discourse.paraview.org/t/paraview-state-file-problem-state-file-does-not-show-a-slice-from-a-dataset/9114/5 "2022-03-04T16:29:58Z")

</div>

Here is the state file for this data  
[test.pvsm](https://discourse.paraview.org/uploads/short-url/4NKyVAyxwL52ImXppDUfC8lmHaj.pvsm) (620.0 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: [March 7, 2022, 8:19am UTC](https://discourse.paraview.org/t/paraview-state-file-problem-state-file-does-not-show-a-slice-from-a-dataset/9114/6 "2022-03-07T08:19:08Z")

</div>

I requested access already.

---

<div class="post-metadata">

### Author: ![callista](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/c/c68b51/32.png) [@callista](https://discourse.paraview.org/u/callista)
#### Post date: [March 7, 2022, 8:20am UTC](https://discourse.paraview.org/t/paraview-state-file-problem-state-file-does-not-show-a-slice-from-a-dataset/9114/7 "2022-03-07T08:20:32Z")

</div>

OK, I hope I’ve enabled it just now.

---

<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: [March 7, 2022, 8:41am UTC](https://discourse.paraview.org/t/paraview-state-file-problem-state-file-does-not-show-a-slice-from-a-dataset/9114/8 "2022-03-07T08:41:18Z")

</div>

Not enterely sure but it looks like data (u, theta) is missing on some of the timesteps, this may causes this issue.

---

<div class="post-metadata">

### Author: ![callista](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/c/c68b51/32.png) [@callista](https://discourse.paraview.org/u/callista)
#### Post date: [March 7, 2022, 8:44am UTC](https://discourse.paraview.org/t/paraview-state-file-problem-state-file-does-not-show-a-slice-from-a-dataset/9114/9 "2022-03-07T08:44:13Z")

</div>

OK, I will check that, thank you.

---

<div class="post-metadata">

### Author: ![callista](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/c/c68b51/32.png) [@callista](https://discourse.paraview.org/u/callista)
#### Post date: [March 7, 2022, 9:04am UTC](https://discourse.paraview.org/t/paraview-state-file-problem-state-file-does-not-show-a-slice-from-a-dataset/9114/10 "2022-03-07T09:04:49Z")

</div>

I have one more question if you can tell me your opinion please, is it possible that this programmable filter code I use is messing something up? This part with switching to vtk table maybe?

---

<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: [March 7, 2022, 9:06am UTC](https://discourse.paraview.org/t/paraview-state-file-problem-state-file-does-not-show-a-slice-from-a-dataset/9114/11 "2022-03-07T09:06:50Z")

</div>

Your programmable filter is not using the data mentionned in the error, so I do not see how this is related. You can just remove it and see if the error is stil present.

---

<div class="post-metadata">

### Author: ![callista](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/c/c68b51/32.png) [@callista](https://discourse.paraview.org/u/callista)
#### Post date: [March 7, 2022, 9:07am UTC](https://discourse.paraview.org/t/paraview-state-file-problem-state-file-does-not-show-a-slice-from-a-dataset/9114/12 "2022-03-07T09:07:47Z")

</div>

Oh, OK I see. Thank you.

---

<div class="post-metadata">

### Author: ![callista](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/c/c68b51/32.png) [@callista](https://discourse.paraview.org/u/callista)
#### Post date: [March 7, 2022, 10:01am UTC](https://discourse.paraview.org/t/paraview-state-file-problem-state-file-does-not-show-a-slice-from-a-dataset/9114/13 "2022-03-07T10:01:49Z")

</div>

The error is present even without the programmable filter.  
The error only happens when I open these 2 datasets at the same time. I tried just doing the slice to the 3d set with programmable filter included and everything works perfectly. As soon as I open this vtk as well, then the slice is not existing (with or without the programmable filter).

---

<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: [March 7, 2022, 10:02am UTC](https://discourse.paraview.org/t/paraview-state-file-problem-state-file-does-not-show-a-slice-from-a-dataset/9114/14 "2022-03-07T10:02:51Z")

</div>

could you provide simples steps to repro ?

---

<div class="post-metadata">

### Author: ![callista](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/c/c68b51/32.png) [@callista](https://discourse.paraview.org/u/callista)
#### Post date: [March 7, 2022, 10:15am UTC](https://discourse.paraview.org/t/paraview-state-file-problem-state-file-does-not-show-a-slice-from-a-dataset/9114/15 "2022-03-07T10:15:18Z")

</div>

Sure,  
so steps with error:

1. open evropska\_surfs\_var\_theta\_surface.vtu.series with XML polydata reader.  
2 open evropska\_3d\_velocity\_interpolate.nc , netcdf reader, uncheck spehrical coordinates, check replace fill value with none, and switch output type to image
2. choose theta for example
3. Make a slice to that dataset
4. save state and reload the state and this is what I got  
 ![Screenshot from 2022-03-07 11-14-31](https://discourse.paraview.org/uploads/default/original/2X/3/319b4232cb020c6c489184120592acfe817c0954.jpeg)

---

<div class="post-metadata">

### Author: ![callista](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/c/c68b51/32.png) [@callista](https://discourse.paraview.org/u/callista)
#### Post date: [March 7, 2022, 10:21am UTC](https://discourse.paraview.org/t/paraview-state-file-problem-state-file-does-not-show-a-slice-from-a-dataset/9114/16 "2022-03-07T10:21:01Z")

</div>

The same thing happens when I calculate velocity vector and apply the Slice to that data set etc.

Btw, we checked the data and in 3d output all varaibles are in all time steps, the only different thing is that surface data are from 600 to 6001. But the 3d ouput are from 0 to 5401. This is only difference.

---

<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: [March 7, 2022, 2:08pm UTC](https://discourse.paraview.org/t/paraview-state-file-problem-state-file-does-not-show-a-slice-from-a-dataset/9114/17 "2022-03-07T14:08:20Z")

</div>

Looks like I missed one glaring problem. Your .vtu files contains polydata and should all be renammed as .vtp files.

---

<div class="post-metadata">

### Author: ![callista](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/c/c68b51/32.png) [@callista](https://discourse.paraview.org/u/callista)
#### Post date: [March 7, 2022, 4:19pm UTC](https://discourse.paraview.org/t/paraview-state-file-problem-state-file-does-not-show-a-slice-from-a-dataset/9114/18 "2022-03-07T16:19:13Z")

</div>

Hi, I tested it with vtp and it works perfectly like this.

But when I add this programmable filter that I have I get the same error and same behavior as before. I will see what can be done about it. Thank you for the help.
