python script not working
search cancel

python script not working

book

Article ID: 198873

calendar_today

Updated On:

Products

CA Automic Workload Automation - Automation Engine

Issue/Introduction

Hi team,

Automic Admim running the python script in our production but is getting below error.

File "/usr/lib/python2.7/site-packages/requests/adapters.py", line 419, in send    raise ConnectTimeout(e, request=request)requests.exceptions.ConnectTimeout: HTTPSConnectionPool(host='fssfed.ge.com', port=443): Max retries exceeded with url: /fss/as/token.oauth2 (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f9e1c3a4610>: Failed to establish a new connection: [Errno 110] Connection timed out',))

the same python script works externally on the same system.

Environment

Release : 12.3

Component : AUTOMATION ENGINE

Cause

Automic Python Interpreter not setup 

Resolution

In client 0, add a line to the variable UC_EXT_INTERPRETERS_UNIX in folder DIV_VARIABLES:

Key = PYTHON
Value 1 = .py
Value 2 = /usr/bin/python <FILE>

Than when executing the python script you can use:

BEGIN_EXT_INT Python

python -file /usr/lib/python2.7/site-packages/requests/adapters.py

:END_EXT_INT

or putting the python's contents in our UI:

:BEGIN_EXT_INT PYTHON

# This program adds two numbers

num1 = 1.5 num2 = 6.3

# Add two numbers

sum = num1 + num2

# Display the sum print('The sum of {0} and {1} is {2}'.format(num1, num2, sum))

:END_EXT_INT