testaaaz
Contributor
Contributor

infinity compile vRO python action

Hello Community,

 

I create a python action on vRO, and when i run it, i dont receive any result and the action is running to infinity.

And this problem just for python , the others languages is work like a javascript.

 testaaaz_1-1647258017919.png

 

Please, any one he have the solution.

 

 

 

 

Thank you

0 Kudos
9 Replies
paul_xtravirt
Expert
Expert

Without seeing your code it is very hard to diagnose. Can you post it?

If you found this helpful, please consider awarding some points
0 Kudos
testaaaz
Contributor
Contributor

This is a simple code :

def handler(context, inputs):
    if inputs.get('name') == 'Jhon':
        print("You are Jhon)
    else:
        print("You are Not Jhon)
0 Kudos
paul_xtravirt
Expert
Expert

You've got some errors in there that could be corrected and then retest but I don't see why that would cause the issue. Here is the amended code.

 

def handler(context, inputs):
if inputs.get('name') == 'Jhon':
print("You are Jhon")
else:
print("You are Not Jhon")

If you found this helpful, please consider awarding some points
0 Kudos
testaaaz
Contributor
Contributor

even if I make mistakes on the code, I do not receive any problem, and it remains in the status "in progress" for a long time.

Like that: 

testaaaz_0-1647260212808.png

I think the problem is at the compiler level.

0 Kudos
xian_
Expert
Expert

Paul's version works perfectly fine. Have you corrected your errors according to his code?

0 Kudos
testaaaz
Contributor
Contributor

the problem is not in the code, because if it is , i receive a erreur, but in my case the action is running for a long time. without display no error or result

0 Kudos
xian_
Expert
Expert

Anything in /data/vco/usr/lib/vco/app-server/logs/scripting.log ?

0 Kudos
testaaaz
Contributor
Contributor

I see no trace of my action when i execute it

0 Kudos
xian_
Expert
Expert

you may try to re-deploy the services by running

/opt/scripts/deploy.sh

0 Kudos