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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
knamburi
Frequent Visitor

Python - PBI Desktop

Hi Everyone,

 

Trying to run Python in PBI Desktop for the first time. How many times i give the value in IDE it does not hold. 

 

knamburi_1-1709231365600.png

 

I keep getting an error , not sure if this is related

 

knamburi_2-1709231568698.png

 

I am able to open VS Code IDE from PBI visualization

 

knamburi_3-1709231742581.png

 

what ever way, i keep getting this error

 

DataSource.Error: ADO.NET: Python script error.
<pi>Traceback (most recent call last):
File "C:\Users\namburi\PythonScriptWrapper_3baf4a97-3db7-47be-bf27-6c91ee2f54e8\PythonScriptWrapper.PY", line 3, in <module>
matplotlib.use('Agg')
^^^^^^^^^^^^^^
AttributeError: module 'matplotlib' has no attribute 'use'
</pi>
Details:
DataSourceKind=Python
DataSourcePath=Python

 

 

Not sure what is the issue, if any one can help, it would be helpful

 

Regards,

K

1 REPLY 1
Anonymous
Not applicable

Hi @knamburi ,

 

For such issues, try launching the Power BI Desktop executable from the Anaconda prompt after running the Python script's environment.
You can refer to the following blog and similar solutions.

Fixing ADO.NET error trying to run Python Script in Power BI | by Luca Zavarella | Microsoft Azure |...

Solved: Power BI Python ADO.NET: Python Script Error - Microsoft Fabric Community

 

Best Regards,
Adamk Kong

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.