# Trace not generating load state with choose filenames

**URL:** https://discourse.paraview.org/t/trace-not-generating-load-state-with-choose-filenames/14830
**Category:** ParaView Support
**Created:** [June 12, 2024, 5:46am UTC](https://discourse.paraview.org/t/trace-not-generating-load-state-with-choose-filenames/14830 "2024-06-12T05:46:46Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![dutta-alankar](https://discourse.paraview.org/user_avatar/discourse.paraview.org/dutta-alankar/32/13310_2.png) [@dutta-alankar](https://discourse.paraview.org/u/dutta-alankar)
#### Post date: [June 12, 2024, 5:46am UTC](https://discourse.paraview.org/t/trace-not-generating-load-state-with-choose-filenames/14830/1 "2024-06-12T05:46:46Z")

</div>

I’m starting a `python trace`, after which I’m choosing to load a ParaView `.pvsm` state. In the load state window, I’m changing the filename to select a different data file. Then on stopping the trace, I see that the `LoadState` function has popped up in trace, but it lacks the argument that a file different from the saved state was selected. How to get around this, and have a python code with a different file passed in `LoadState` generated by trace. This is useful as I want to use this trace with the file later provided as a command line argument by modifying the python `trace` code.

---

<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: [June 12, 2024, 7:21am UTC](https://discourse.paraview.org/t/trace-not-generating-load-state-with-choose-filenames/14830/2 "2024-06-12T07:21:52Z")

</div>

Looks like an issue to me, please open it: [https://gitlab.kitware.com/paraview/paraview/-/issues](https://gitlab.kitware.com/paraview/paraview/-/issues)

---

<div class="post-metadata">

### Author: ![dutta-alankar](https://discourse.paraview.org/user_avatar/discourse.paraview.org/dutta-alankar/32/13310_2.png) [@dutta-alankar](https://discourse.paraview.org/u/dutta-alankar)
#### Post date: [June 12, 2024, 8:49am UTC](https://discourse.paraview.org/t/trace-not-generating-load-state-with-choose-filenames/14830/3 "2024-06-12T08:49:16Z")

</div>

Opened: [https://gitlab.kitware.com/paraview/paraview/-/issues/22658](https://gitlab.kitware.com/paraview/paraview/-/issues/22658)

---

<div class="post-metadata">

### Author: ![millsand](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/m/ecb155/32.png) [@millsand](https://discourse.paraview.org/u/millsand)
#### Post date: [June 13, 2024, 7:40pm UTC](https://discourse.paraview.org/t/trace-not-generating-load-state-with-choose-filenames/14830/4 "2024-06-13T19:40:30Z")

</div>

I have been dealing with the same problem. Is there any solution yet for this?

---

<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: [June 17, 2024, 9:04am UTC](https://discourse.paraview.org/t/trace-not-generating-load-state-with-choose-filenames/14830/5 "2024-06-17T09:04:07Z")

</div>

Of course not, the issue has just been created.

---

<div class="post-metadata">

### Author: ![millsand](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/m/ecb155/32.png) [@millsand](https://discourse.paraview.org/u/millsand)
#### Post date: [June 18, 2024, 7:24pm UTC](https://discourse.paraview.org/t/trace-not-generating-load-state-with-choose-filenames/14830/6 "2024-06-18T19:24:42Z")

</div>

Fair enough,

For those dealing with a similar issue I found a simple workaround by just skipping the load state, and programming the trace script to perform the steps needed to get to where the load state would’ve taken me otherwise. In my case my load state had something like 8 clips and 2 calculators, so I just made the trace script to manually perform the 8 clips and 2 calculators.

It’s annoying, especially if the load state loads a huge amount of functions. But once you write it once you can copy and paste the script to have it work for all filenames you need to get data from.

Hopefully that can help others stuck in the same position!

---

<div class="post-metadata">

### Author: ![dutta-alankar](https://discourse.paraview.org/user_avatar/discourse.paraview.org/dutta-alankar/32/13310_2.png) [@dutta-alankar](https://discourse.paraview.org/u/dutta-alankar)
#### Post date: [June 19, 2024, 4:30am UTC](https://discourse.paraview.org/t/trace-not-generating-load-state-with-choose-filenames/14830/7 "2024-06-19T04:30:40Z")

</div>

I have been personally doing this. But it is a pain if the workflow is too long or if you do any mistake along the way, all of that also gets recorded which can add a lot of unnecessary compute times while getting applied on large datasets.
