Python session status

Python session status

Each new Assistant thread runs a Python environment. It is in the Python environment where all Python code suggested by the Assistant runs to deliver data insights and visualizations.

After you create a new thread, the Python session is initialized in the background before it becomes ready for use. Until then, the Python session status is Initializing.

Python session initializing

After the Python session becomes available, its status changes to Running.

Python session running

After 15 minutes of inactivity, the Python session status changes to Expired.

Python session expired

Handle expired Python sessions

After the Python session expires in a thread, you can no longer run Python code in that thread. If you try to run Python code in an expired Python session, you will see an error message.

To run Python again, you need to create a new Assistant thread.