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 / Run Python Script No O...
Power Automate
Answered

Run Python Script No Output

(0) ShareShare
ReportReport
Posted on by 3
Python scripts that run fine in Visual Studio don't run in Power Automate, and the action doesn't display like it is supposed to. The top action is a python script that functions and the bottom action is one that doesn't function. Any script more than a couple lines seems to have this compiling issue and the action doesn't do anything. Here is the code from the bottom action:
 

import datetime as dt
from datetime import date
import calendar

current_date = dt.datetime.now()

today = date.today()

month_number = today.month

month = calendar.month_name[month_number]

mon = month[:3]

yyyy = current_date.year

filepath = '\\' + str(yyyy) + '\\' + month + '\\' + str(7)+  '. ' + mon + " " + str(yyyy) + " " + "name"

print (filepath)
 
This issue will also appear for instance if I leave the first couple lines of the script empty and write my code starting in a later line. So my guess is that it is an issue with power automate reading/compiling the code. Any ideas?
I have the same question (0)
  • Verified answer
    eetuRobo Profile Picture
    4,535 Super User 2026 Season 1 on at
    Scripts usually don't fail the flow ever even if an error happens inside them. That's why you need to enable ScriptError variable in them.

    Enable "ScriptError" under "Variables produced" in the python action and check what output that gives when you run the flow.


    Then output might be like this:


    That would tell you that error happened in line 3 since there is no calendar module installed

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 791

#2
Valantis Profile Picture

Valantis 582

#3
Haque Profile Picture

Haque 529

Last 30 days Overall leaderboard