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?