RequestInformation not ran when importing a script from paraview
Short summary: when importing a
ProgrammableSource from a script using the
Run script button,
RequestInformation is not ran. You need to edit the script within the GUI (e.g. add a space), then "Apply" (which you couldn't do before) to have it run.
I have been encountering a weird issue with importing
ProgrammableSource withing the
paraview GUI: I have a
.py that creates a
paraview.simple.ProgrammableSource, as so:
from paraview.simple import * source = ProgrammableSource() source.OutputDataSetType = 'vtkImageData' source.Script = """[........]""" source.ScriptRequestInformation = """[..........]"""
One thing to note is that
ScriptRequestInformation populates timestamps.
If I try to run this script using the
Run Script button here:
ProgrammableSource successfully gets imported (pre-applied. I can't click the apply button) BUT for some reason
ScriptRequestInformation is never ran. I can check that by adding a print inside it. This is an issue because the timestamps are never populated: if I now try to preview it,
Script gets invalid timestamps and fails.
The only workaround I've found is to change something in
Script from the UI (example: add a space), THEN click
Apply (because now you can), and this time
ScriptRequestInformation successfully gets executed and timestamps are properly populated:
Am I missing something (a function to call in the script to make sure
ScriptRequestInformation is ran?), is this expected?
Thanks a lot for your support, Regards
- Paraview: 5.9.1-1209
- Debian GNU/Linux 10 (buster)
- Paraview: 5.9.1-1209-egl-mpi
- RHEL 7.7
- GPU: Quadro GV100