Skip to main content
I have tried to run a python script and it gives me the error "failed in python execution". I even tried to run the Automation Anywhere test documentation script and got the same error.I have correctly installed python and its libraries and it is in the environment variables.The script runs fine in cmd.I hope you can help me.
I also tried running it through the Manual input and through the external file, however it throws the same error.The error occurs in the "run function" action, it does not show me the output variable

@lcastello25  Please provide log file and also i assume you already completed all pre requisites 

https://docs.automationanywhere.com/bundle/enterprise-v2019/page/enterprise-cloud/topics/aae-client/bot-creator/commands/cloud-python-command.html

 

Before you start

Ensure the following requirements are met before using the Python Script package:

  • The appropriate version of Python is installed on the device on which you want to execute the script.

    Note:Python versions 2.x and 3.x are supported.

  • The "PATH" environment variable is updated to the path of the Python folder.

    To verify if the Python environment variable is set correctly, enter Python in the command prompt. If it returns the Python version that is installed, the path environment is set up correctly.

Perform the following actions within the Python Script package as part of using the set of available actions:

  1. Open a Python Script file, or manually enter the script you want to run using the Open action. You must associate the details of the file or script you want to run with a session name.
  2. Run the script using the Execute function or the Execute script action. You must use the same Python Script session name established in the Open action.
  3. Close the Python Script session after running the script.

Note:When you run a bot that contains Python Script actions, the script runs in the background.

To review the bot launcher logs, navigate to C:\ProgramData\AutomationAnywhere\BotRunner\Logs\<current month>\Bot_Launcher-<today's date>.log.zip. Each zipped folder contains a file with data on the code execution, which is useful for debugging.


Thanks for the reply.I already tried what you indicate, but no result.In the log files I have nothing.I even tried uninstalling and reinstalling python on my computer but it still gives the same error

@lcastello25  do you see any other AA log files in bot runner machine… 


@lcastello25 

Check if you are facing the issue described in the follow KB:

https://apeople.automationanywhere.com/s/article/Python-script-fails-to-save-file

Regards.


Reply