RequestInformation not launched when importing a script from paraview

Hi,

(As a disclaimer, I’m fairly new to paraview.)

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:

The 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 ScriptRequestInformation or 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

Looks like a bug. Could you open an issue on our gitlab ?
https://gitlab.kitware.com/paraview/paraview/-/issues

1 Like

Thanks for the quick response. I’ll be over https://gitlab.kitware.com/paraview/paraview/-/issues/20785