# Loading identical .py state and .pvsm states give inconsistent results

**URL:** https://discourse.paraview.org/t/loading-identical-py-state-and-pvsm-states-give-inconsistent-results/10939
**Category:** ParaView Support
**Created:** [December 7, 2022, 6:37pm UTC](https://discourse.paraview.org/t/loading-identical-py-state-and-pvsm-states-give-inconsistent-results/10939 "2022-12-07T18:37:30Z")
**Posts on this page:** 4
**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: [December 7, 2022, 6:37pm UTC](https://discourse.paraview.org/t/loading-identical-py-state-and-pvsm-states-give-inconsistent-results/10939/1 "2022-12-07T18:37:30Z")

</div>

I’m having a ParaView state saved as .pvsm gives correct position of colorbars and other elements. However, when the same state is stored and loaded as a .py script the colorbars get misplaced. What is the issue? (version: ParaView 5.10.1)  
I’m putting in the relevant images.  
**Loading .pvsm state:**

 ![image](https://discourse.paraview.org/uploads/default/original/2X/2/22087759b0440a0593c0787349d1e46ab195aa2d.png)  
**Misplaced colorbars on loading .py state produced at the same time in the GUI:**  
 ![image](https://discourse.paraview.org/uploads/default/original/2X/c/c30c45b85b7c20fedcb9b229c63e541d0661e70c.png)  
@mwestphal @nicolas.vuaille or anyone more experienced in the community please help me out here.

---

<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: [December 7, 2022, 7:12pm UTC](https://discourse.paraview.org/t/loading-identical-py-state-and-pvsm-states-give-inconsistent-results/10939/2 "2022-12-07T19:12:58Z")

</div>

Later finding:  
The placement of the colorbars become consistent when the .py script is loaded and generated in ParaView 5.11.0 version compared to the inconsistencies in 5.10.1 version. However, the font sizes are still in-consistent and don’t give identical results. As a result of this, parts of the text get cut off at the edges. Also, most likely because of this, same issues happen for Catalyst python states as well. Can someone more experienced in the community help me fix this issue?  
**Here is the screenshot of what happens on loading the .py state script in ParaView 5.11.0** :

 ![image](https://discourse.paraview.org/uploads/default/original/2X/2/27171599d753e09112dcde067994f1ac05aab312.png)  
Related:

> [@Use .pvsm state in Catalyst python state script](https://discourse.paraview.org/t/use-pvsm-state-in-catalyst-python-state-script/10935):
>
> Is there a way that I can load a .pvsm file using LoadState or something similar inside a Python script of Catalyst state and use that to point to the exposed data pointers used during runtime? This would be extremely useful in getting exact behaviour as well as clutter free python script for the ParaView Catalyst states.

> [@Pipeline save and Catalyst dumps inconsistent](https://discourse.paraview.org/t/pipeline-save-and-catalyst-dumps-inconsistent/10700/2):
>
> Hi! Anyone has any clue what is the issue? I’m pretty much stuck here and out of ideas.

---

<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: [December 9, 2022, 6:45am UTC](https://discourse.paraview.org/t/loading-identical-py-state-and-pvsm-states-give-inconsistent-results/10939/3 "2022-12-09T06:45:41Z")

</div>

Looks like a bug, could you open it ?

---

<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: [December 9, 2022, 9:05am UTC](https://discourse.paraview.org/t/loading-identical-py-state-and-pvsm-states-give-inconsistent-results/10939/4 "2022-12-09T09:05:07Z")

</div>

Opened an issue:  
[Loading identical .py state and .pvsm states give inconsistent results (#21697) · Issues · ParaView / ParaView · GitLab (kitware.com)](https://gitlab.kitware.com/paraview/paraview/-/issues/21697)
