pvpython script - save screenshot not rendering properly.

Hi all, i’m attempting to write a batch script so I can save screenshots of flowfields generated on a cluster computer without access to a gui.

I’ve started simply with a trace for paraview 5.6.0, however when I go to run the trace I get some strange behaviour when saving my flow field.

Here is what I get when using the GUI to record the trace trace:

And here is what I get when running the trace (similar results for pvpython and pvbatch) with no changes:

I’m sure there is something simple i’m missing with rendering, but its been a couple days now and I haven’t been able to figure it out, so any help would be greatly appreciated.

example_trace.py (2.2 KB)

I’ve attached a copy of the trace (with some edited view sizes etc) if that helps. Unfortunately the data upload errored.

Update: I have successfully saved the screenshot using pvpython from a paraview 5.10 trace on windows.

It seems like the render issue is to do with using linux via WSL2. If anyone has any further ideas on this, I would love to hear them…


I have no answer on the bug itself, but note that ParaView 5.6 is quite old now, the last version is 5.12. (https://www.paraview.org/download/?version=v5.12)

Also using ParaView through WSL is not tested in the dev process, so probably not working properly.

Thanks Nicolas,

On further inspection, I was using paraview 5.6 which I downloaded with OpenFoam a while ago.
I removed that version, and installed paraview 5.12 on WSL, and now the GUI works but does not render any VTK files.

To me, this confirms that there are some WSL issues… Will keep this updated if I find anything else.