Error when using "Load python script activity"

Hello Prasanth,

I have attached the .py file and loaded the python script. It worked fine. But whenever you want to return the output make sure you write a python program using a function and use Invoke python method activity to pass the inputs. I’m attaching the Python file along with the workflow. Please go through it and reply back if there’s any concern.

In the python scope, make sure u give the target as x86 as you are using python 32 bit.

I’m not able to attach the python file. So typing it here:

def Apachfn(keyinput):
import hmac
import hashlib, sys
import base64
import time
import math
key=keyinput
data = str(math.trunc(time.time()))
print (data)
a = base64.b64encode(hmac.new(b’key’, b’msg=data’, digestmod=hashlib.sha256).digest())
print (a)
return("Data: “+data+” "+"A: "+str(a))

Thanks and Regards,
Rahul, PTEST.xaml (10.4 KB)

1 Like