Python Script not executing via Workload Automation Agent
search cancel

Python Script not executing via Workload Automation Agent

book

Article ID: 418878

calendar_today

Updated On:

Products

ESP dSeries Workload Automation - Business Agents (dSeries) ESP dSeries Workload Automation - Scheduler (dSeries) ESP dSeries Workload Automation - System Agent (dSeries) Workload Automation Agent

Issue/Introduction

User has a job that fails with invalid shell error that is running a .py script in a unix agent.

Environment

Workload Automation Agent: 12.x or above

Cause

The script will executed inside a shell. E.g.

11/14/2025 14:08:14.914-0500 CAWA_I_20041 Executing /bin/bash -bash -c python3 /usr/bin/env /path/script.py pid: 1405229
11/14/2025 14:08:14.967-0500 CAWA_I_20017 Job completed successfully. Exit code 0

The script probably has some commands which are not executing properly.  Set the PATH of the user or use absolute path for the script in the job.

Resolution

Code the absolute path of the script or update the user PATH.  The user is the user the runs the job.