# Stop an animation through pvpython and connection to server

**URL:** https://discourse.paraview.org/t/stop-an-animation-through-pvpython-and-connection-to-server/11979
**Category:** ParaView Support
**Tags:** python
**Created:** [April 28, 2023, 9:08am UTC](https://discourse.paraview.org/t/stop-an-animation-through-pvpython-and-connection-to-server/11979 "2023-04-28T09:08:03Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Ouxid](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/o/c2a13f/32.png) [@Ouxid](https://discourse.paraview.org/u/Ouxid)
#### Post date: [April 28, 2023, 9:08am UTC](https://discourse.paraview.org/t/stop-an-animation-through-pvpython-and-connection-to-server/11979/1 "2023-04-28T09:08:03Z")

</div>

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

```auto
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!

---

<div class="post-metadata">

### Author: ![jourdain](https://discourse.paraview.org/user_avatar/discourse.paraview.org/jourdain/32/11_2.png) [@jourdain](https://discourse.paraview.org/u/jourdain)
#### Post date: [May 6, 2023, 5:22pm UTC](https://discourse.paraview.org/t/stop-an-animation-through-pvpython-and-connection-to-server/11979/2 "2023-05-06T17:22:11Z")

</div>

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](https://www.paraview.org/Wiki/ParaView/Collaboration#Collaboration)
