web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Facing an issue while ...
Power Automate
Unanswered

Facing an issue while using Run python Script in PowerAutomateDesktop(PAD)

(0) ShareShare
ReportReport
Posted on by 6

Hello,

 

When i execute Python script using "Run Python Script" Action in PAD i m getting syntax Error , But the script is working fine with Pycharm and visual studio. Can some one help on this.

 

Error: Parameter 'Python script to run': Syntax error.

 

 

I have the same question (0)
  • OkanMTL Profile Picture
    703 Super User 2024 Season 1 on at

    Power Automate Desktop runs Python 2 scripts only for now, I'm guessing you wrote your script in Python 3+ and that is why you're getting a syntax error. Try converting your script to Python 2.

     

    FYOI, in the advanced options when running Python activity in PAD, you can put on ScriptError, which will show at which line the errors occur. 

  • pushpaLatha1 Profile Picture
    6 on at

    Hi @OkanAT ,

     

    Thanks for the quick response. I m running python 2 script only.

     

    Error:(Sub flow: Main, Line: 11, Action name: Run Python script) But i didn't find any error in the error location

  • OkanMTL Profile Picture
    703 Super User 2024 Season 1 on at

    Perhaps you are using some libraries that are outdated or have to be imported in some way?

     

    Could you show line 11?

  • pushpaLatha1 Profile Picture
    6 on at

    Enclosed  screen shot pushpaLatha1_1-1687260014050.png

     

  • pushpaLatha1 Profile Picture
    6 on at

    enclosed few script images

    PScript-1.png
    PScript-2.png
    PScript-3.png

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 484

#2
11manish Profile Picture

11manish 282

#3
David_MA Profile Picture

David_MA 280 Super User 2026 Season 1

Last 30 days Overall leaderboard