vtk.vtkCommand.TimerEvent

Hello!
It tries to use vtk.vtkCommand.TimerEvent to take X screenshots at a set time. However, the callback from the specified event does not work. Currently, it is only trying to output the iteration id in the console to test this class. Has anyone had a similar problem?
I am using python

The timer events will only fire while the event loop is running, that is, after you call the interactor’s Start() method. Note that the event loop stops when the Start() method returns (e.g. when you close the window).