# Paraview "Export Animated Scene" exported .vtkjs file with wrong time order

**URL:** https://discourse.paraview.org/t/paraview-export-animated-scene-exported-vtkjs-file-with-wrong-time-order/15606
**Category:** ParaView Support
**Created:** [October 22, 2024, 11:21am UTC](https://discourse.paraview.org/t/paraview-export-animated-scene-exported-vtkjs-file-with-wrong-time-order/15606 "2024-10-22T11:21:57Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Albers\_Steven](https://discourse.paraview.org/user_avatar/discourse.paraview.org/albers_steven/32/10391_2.png) [@Albers\_Steven](https://discourse.paraview.org/u/Albers_Steven)
#### Post date: [October 22, 2024, 11:21am UTC](https://discourse.paraview.org/t/paraview-export-animated-scene-exported-vtkjs-file-with-wrong-time-order/15606/1 "2024-10-22T11:21:57Z")

</div>

Hi, I’m using Paraview “Export Animated Scene” to generate an .vtkjs format file. But when I load it in Kitware Glance, I noticed that the animation order is wrong.

For example, I have 151 files which name like a\_0000.vtk to a\_0150.vtk, and I load it in paraview as an group, then I can play it as an animation. But when I exported to .vtkjs file, It played in an wrong place, I notice that, when I load this group file, It has an default order like this image which is absolute wrong.

 ![image](https://discourse.paraview.org/uploads/default/original/2X/5/502dfa9c54a06853bcd288fbf4fa4bb02659aab3.png)

And when i unzip .vtkjs file and compare it to the medium file paraview maked before zip all this folder to one .vtkjs file, I notice that it’s have same data id like this, it’s very obvious that when zip to one .vtkjs format file, it must have some sort bug.

 ![image](https://discourse.paraview.org/uploads/default/original/2X/6/65d65cd042831f2d9cc89b40fbfcaee9ba235842.jpeg)

Here is my origin group files and exported .vtkjs file.  
[group\_file.zip](https://discourse.paraview.org/uploads/short-url/pJJTZ6piBBo5euLInaGyNkUz9z2.zip) (3.5 MB)  
[exported.vtkjs](https://discourse.paraview.org/uploads/short-url/w9t7FRS8KXzjJSN1DFEBxbjOHGW.vtkjs) (2.6 MB)

---

<div class="post-metadata">

### Author: ![Albers\_Steven](https://discourse.paraview.org/user_avatar/discourse.paraview.org/albers_steven/32/10391_2.png) [@Albers\_Steven](https://discourse.paraview.org/u/Albers_Steven)
#### Post date: [October 24, 2024, 4:16am UTC](https://discourse.paraview.org/t/paraview-export-animated-scene-exported-vtkjs-file-with-wrong-time-order/15606/2 "2024-10-24T04:16:29Z")

</div>

The problem is locate in VTK source code [vtkjs\_helper.py](https://github.com/Kitware/VTK/blob/5fd6ec84fee1af9c4171fdee2a107ea0e49f5f1b/Web/Python/vtkmodules/web/vtkjs_helper.py#L204C23-L204C29), when zip all timestep directories, it use system default sort algorithm, when you have string name like "0,1,2,3,4,5,6,7,8,9,10,11,12,13,… ", it sort the list with order like “0,1,11,12,13,2,3,4,5,6” which cause an bug here.

Maybe there should accept another param like sort algorithm callback function let people decide how to sort it manually.

 ![image](https://discourse.paraview.org/uploads/default/original/2X/7/797a520f947d03d1b1ab1d1d65fb3f54d1263260.png)

---

<div class="post-metadata">

### Author: ![Mohamed\_Ibrahim](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mohamed_ibrahim/32/16502_2.png) [@Mohamed\_Ibrahim](https://discourse.paraview.org/u/Mohamed_Ibrahim)
#### Post date: [May 27, 2025, 12:40am UTC](https://discourse.paraview.org/t/paraview-export-animated-scene-exported-vtkjs-file-with-wrong-time-order/15606/3 "2025-05-27T00:40:02Z")

</div>

I have the same problem. how did you sove it?

---

<div class="post-metadata">

### Author: ![jourdain](https://discourse.paraview.org/user_avatar/discourse.paraview.org/jourdain/32/11_2.png) [@jourdain](https://discourse.paraview.org/u/jourdain)
#### Post date: [May 27, 2025, 3:24pm UTC](https://discourse.paraview.org/t/paraview-export-animated-scene-exported-vtkjs-file-with-wrong-time-order/15606/4 "2025-05-27T15:24:47Z")

</div>

The latest version of VTK fixed that code.

> <https://github.com/Kitware/VTK/commit/7cd880e25b6a5dddef6704b1d1a4904dfac49715>
>
> This is for correctly sorting names that have numeric components
> without leading… zeros, e.g. \[f.0, f.10, f.5\] -\> \[f.0, f.5, f.10\].

---

<div class="post-metadata">

### Author: ![Mohamed\_Ibrahim](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mohamed_ibrahim/32/16502_2.png) [@Mohamed\_Ibrahim](https://discourse.paraview.org/u/Mohamed_Ibrahim)
#### Post date: [May 27, 2025, 11:19pm UTC](https://discourse.paraview.org/t/paraview-export-animated-scene-exported-vtkjs-file-with-wrong-time-order/15606/5 "2025-05-27T23:19:00Z")

</div>

I work in windows 10. I hope you have instruction to install it using cmd with paraview
