I am trying to do some processing on a Linux machine and save a state file. Then I bring it to my windows machine and when I try to open it, it fails. The same vtr file opens fine with Paraview on windows. Any thoughts on why this happens? Some files below to replicate it:
grid.vtr (3.5 KB)
The python script I use (with pvbatch) to create the state file on the Linux machine:
from paraview.simple import *
renderView = GetActiveViewOrCreate('RenderView')
renderView.OrientationAxesVisibility = 0
geovtr = XMLRectilinearGridReader(registrationName='grid', FileName=['grid.vtr'])
geovtr.PointArrayStatus = ['checkers', 'ball']
# get layout
layout1 = GetLayout()
# layout/tab size in pixels
I suspect it’s the filename. Make sure you fix the filenames when loading the state file on Windows to point to the correct vtr file. You’re using relative path in the python script, so the state will have a relative path too. The current working directory on your Windows may not be what you’re expecting it to be. So make sure to fix the filename to an absolute path when loading the state file.
If you post the errors you’re getting when you load the state file, that may also help identify the issue, if filename is not the problem.
Which version of Paraview are you using?
I am using Paraview 5.9.0 on the Linux machine and Paraview 5.10.0 on the windows machine. Do you think that might be an issue? If so, I can try 5.10.0 on both machines.
Paraview 5.10 properly handles utf-8 filenames and text in state files, so it’s worth checking.
In the python script above, the state file
grid.pvsm is saved in the same location as
grid.vtr. I copy both of them to the windows machine at the same folder. I am not sure if the location gets messed up somehow though.
Here’s the error message from Paraview on the windows machine:
ERROR: In C:\glr\builds\paraview\paraview-ci\build\superbuild\paraview\src\VTK\IO\XML\vtkXMLReader.cxx, line 306
vtkXMLRectilinearGridReader (00000249315C93D0): Error opening file grid.vtr
It’s indeed a file path issue. When you load the state file, a dialog popups up. Please use that dialog to update the file and it should work as expected. ref
That worked. Thanks so much!