I’m trying to make a python script that is automatically generated with the Paraview trace tool to work from the command line.
I log in onto our cluster with putty and X11 forwarding enabled. Paraview works normally and I made the super simple test script shown below with it:
# trace generated using paraview version 5.6.0 # # To ensure correct image size when batch processing, please search # for and uncomment the line `# renderView*.ViewSize = [*,*]` #### import the simple module from the paraview from paraview.simple import * #### disable automatic camera reset on 'Show' paraview.simple._DisableFirstRenderCameraReset() # create a new 'OpenFOAMReader' w0foam = OpenFOAMReader(FileName='/data/cl01-data/flow/JA/test_plaatjes/w0/w0.foam') w0foam.MeshRegions = ['internalMesh'] # Properties modified on w0foam w0foam.CaseType = 'Decomposed Case' # get active view renderView1 = GetActiveViewOrCreate('RenderView') # uncomment following to set a specific view size # renderView1.ViewSize = [1332, 741] # show data in view w0foamDisplay = Show(w0foam, renderView1)
etcetera. Now, when I type pvpython from /usr/bin/ to run this script, I get:
"Aborted (core dumped)"
I’ve narrowed down that the point at which it goes wrong is:
renderView1 = GetActiveViewOrCreate('RenderView')
Any ideas why this happens?
paraview version 5.6.0
Ubuntu 18.04.4 LTS
ASUS Turbo RTX 2060
Paraview came precompiled with openfoam 7 which I installed using the apt package management tool.