Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Automatic refresh using a Python script that contains environment variables

I am getting an error when trying automatically refresh my report that is using a Python script that contains os environment variables. No issue when running the refresh within the report. I can't provide the error message at this time as it looks like Power BI is having an issue refreshing all Python scripts. I have tried this script on seperate servers. One server it couldn't read any of the os environment variables while the other server it was able read all but one os environment variable.

1 REPLY 1
lbendlin
Super User
Super User

needs more details. Is the personal gateway installed and running?  What's the rationale behind needing to retrieve OS env variables? Which machine do you expect these values to come from?

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors