Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

Edge HMI

Infinite loops in Python

  • Last UpdatedOct 29, 2026
  • 1 minute read

Infinite loops in a Python script may require you to manually terminate the Studio task in Windows.

In a Python script, it is possible to create an infinite loop or such a long running script that the PythonScript background task will not terminate when the runtime is stopped.

When the project is being developed or is running on Windows and the runtime is stopped, if the PythonScript task does not stop within three minutes of the runtime stopping, AVEVA Edge will attempt to terminate the PythonScript task and will continue to do so without allowing AVEVA Edge to be terminated. During this time, a message similar to this will be logged to the Studio Output window for every attempt to halt the PythonScript task:

PythonScript cannot be terminated. Will keep trying, but you may need to kill and restart Studio.

If you chose, you can terminate AVEVA Edge using the Windows Task Manager:

  1. Open the Windows Task Manager.

  2. In the Apps list, locate Studio Manager.exe (32 bit).

  3. Right-click the app and choose End Task on the context menu.

  4. Restart AVEVA Edge.