Question

python script bot error in A360

  • 28 February 2023
  • 3 replies
  • 93 views

Badge +1

I want to encrypt a message using python in A360

code

from cryptography.fernet import Fernet

def enfun():

message=‘Hello Automation’

key=Fernet.generate_key()

f=Fernet(key)

encryptedmessage=fernet.encrypt(message.encode())

return encryptedmessage

 

Installed pip3 install cryptography library. When I run above code the python script is returning bot error to the output variable.

I’m able to run same code in cmd but not from A360

 

Thanks in Advance 


3 replies

Userlevel 3
Badge +9

I want to encrypt a message using python in A360

code

from cryptography.fernet import Fernet

def enfun():

message=‘Hello Automation’

key=Fernet.generate_key()

f=Fernet(key)

encryptedmessage=fernet.encrypt(message.encode())

return encryptedmessage

 

Installed pip3 install cryptography library. When I run above code the python script is returning bot error to the output variable.

I’m able to run same code in cmd but not from A360

 

Thanks in Advance 

Hi @Sparimi ,

 

Can you please share the screenshot of how you wrote the above script in Python execute function action 

Userlevel 7
Badge +13

Hi @Sparimi ,

 

Are you passing any parameter to python from BOT? If yes, you need to change the code especially at the function declaration.

Badge +1

It’s working now syntax mistake 

thanks for the response @Zaid Chougle @Padmakumar 

Reply