Stop an animation through pvpython and connection to server

Hi everyone.

I am currently running a paraview server through “pvserver --multi-clients”, then connecting to that server with the Paraview GUI.
I then interact with my GUI through another instance of pvpython that connects to it with the method Connect of paraview.simple.

This works pretty well and I get to modify things as I want in my pipeline. But I do have a issue regarding the animation.

I would like to pause (and then run again) an animation through the pvpython code, but nothing seems to work?

Through the python shell, I am able to stop and run the animation with simply

renderView1 = GetActiveViewOrCreate('RenderView')
animationScene1 = GetAnimationScene()
animationScene1.PlayMode = 'Sequence'
animationScene1.UpdateAnimationUsingDataTimeSteps()
animationScene1.Stop()

But when I use the same line in pvpython (still connected to my pvserver), nothings happens, not even any error, and the rest of the code that also interacts with the pipeline works flawlessly.
Any idea what I am doing wrong?
Thanks!

When you connect a Python client to a multi-client server you need to process any pending messages like listed here https://www.paraview.org/Wiki/ParaView/Collaboration#Collaboration