Skip to main content
Question

Unable to execute python script-

  • November 7, 2025
  • 5 replies
  • 50 views

Forum|alt.badge.img+3

I am trying to execute chrome clear cache python script , but its not working. it’s working in python compiler not in AA tool. Having python version is 3.x and AA python in latest package

5 replies

Padmakumar
Premier Pathfinder | Tier 7
Forum|alt.badge.img+15
  • Premier Pathfinder | Tier 7
  • 1170 replies
  • November 7, 2025

Hi ​@Ajith 9655,

 

When you say "not working," do you mean it is silently completing the execution without any result, or is it throwing the Bot Error?


Forum|alt.badge.img+8
  • Navigator | Tier 3
  • 78 replies
  • November 7, 2025

AA should improve their python package, no virtual environment support to manage package and python versions. All the scripts(like custom modules) need to be moved to each deployments machine manually.

Document Automation packages can conflict with your python packages as it requires global package installation to work.

Variable type support is so much restricted.

 

You could achieve better result by directly running python via command line instead. Use helper batch or PowerShell script to invoke/ activate environment instead and serialize output to stdout or local file and read that in AA instead.


Aaron.Gleason
Automation Anywhere Team
Forum|alt.badge.img+14
  • Automation Anywhere Team
  • 870 replies
  • November 7, 2025

@Ajith 9655 Take a look at your Bot Agent logs to find out the exact error from the Python interpreter.

Those logs are typically located here:

C:\ProgramData\AutomationAnywhere\BotRunner\Logs


Forum|alt.badge.img+3
  • Author
  • Cadet | Tier 2
  • 6 replies
  • November 7, 2025

Hi ​@Ajith 9655,

 

When you say "not working," do you mean it is silently completing the execution without any result, or is it throwing the Bot Error?

It’s not throwing any error, executing completely, when I try to print the output it gives TRUE


Aaron.Gleason
Automation Anywhere Team
Forum|alt.badge.img+14
  • Automation Anywhere Team
  • 870 replies
  • November 8, 2025

@Ajith 9655 If it is returning "true", your Python script executed. 

One very common mistake I see on this message board is when Python code is not in a function, or is trying to call itself as a function. That's not allowed in AA. Could you share a portion of the code?

You can also search through some of my older posts on this topic.