VTK errors do not raise or return failure in pvpython
I recently discovered an issue in the macOS conda-forge build of Paraview, where the vtkPNGWriter would fail to write due to a libpng mismatch (reported here). It seems like that issue has been rectified in that build, but it has highlighted a different bug in Paraview.
My script that failed to write the png exited cleanly as though nothing had gone wrong, with the only evidence being a vtkPNGWriter error on stderr and a missing png file. This seems incorrect.
If the vtk c++ code being called fails and throws an error, that should raise an exception in the python code accordingly, or at the very least return something representing failure. In this case my call to paraview.simple.SaveScreenshot
returned True
.
I have tried to follow the code a bit more to see what's happening here but quickly ran into compiled .so's at servermanager.misc.Screenshot
so I'm all outta juice.