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
rjacks31
New Member

Running Python Script in Power BI

I have a python script to run a gradio web app. I need to embed the web app on power bi using the HTML Viewer visual. One option that I tried for this was to create a python visual and run my script here, and embed the web app on a different visual.

My requirement is that the script runs on opening Power BI and automatically terminates when I close Power BI. However, the script keeps running in the background even after closing Power BI. Is there any setting to terminate running scripts on closing Power BI or any other option on Power BI for this requirement?

2 REPLIES 2
rjacks31
New Member

Hi @Anonymous ,

 

Thanks for your response. Do you recommend any other option on Power BI that can be used for the requirement that I have described?

Anonymous
Not applicable

Hi @rjacks31 

 

As far as I know, currently, Power BI does not support the ability to automatically terminate Python scripts when Power BI shuts down.

 

Best Regards,
Yulia Xu

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

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

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.