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

Python is not running in Power BI

My python version is: Winpython64-3.7.4.0 and my PowerBi version is: Power BI Desktop (September 2019). This is what I have done: 1. loading a csv file into Power BI; 2. then, home>Edit Querries> this will open a new window. In this window, I went to Transform> Run Python Script > after choosing that, a new window opens that I am supposed to write a python code. I tried different options such as: no code, or a simple code (import pandas as pd; df=pd.DataFrame(dataset)). None of them works! I just recive error below:

"DataSource.Error: ADO.NET: A problem occurred while processing your Python script.
Here are the technical details: Process must exit before requested information can be determined.
Details:
DataSourceKind=Python
DataSourcePath=Python
Message=A problem occurred while processing your Python script.
Here are the technical details: Process must exit before requested information can be determined.
ErrorCode=-2147467259
ExceptionType=Microsoft.PowerBI.Scripting.Python.Exceptions.PythonUnexpectedException"

 

I deeply appreicate if you could help me to fix this issue! I already spent mopre than 1 day on this.

 

 

1 ACCEPTED SOLUTION
Icey
Community Support
Community Support

Hi @pouyanebrahimi ,

When I first try to reproduce your problem, it works well. However, after I changed the Privacy levels of Python and the data source file, the same issue appeared.

python'.PNG

 

Then, I tried these steps and it works well now.

1. Clear permissions of Python and the data source file.

python44.PNG

python4.PNG

2. Continue what you said.

python1.PNGpython2.PNGpython3.PNG

If the issue is still there, please let me know.

 

Best Regards,

Icey

 

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

 

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

Im still gettin the same error after changing the permission as suggested on solution. Any feedback please.

It should work! 

Try to test you python-power conencting in a new power bi file. 

Anonymous
Not applicable

I also tried just the dataset to hold = # 'dataset' holds the input data for this script
still not working.
im using python 3.8

My python is 3.7. It should not be a problem though!

This is my suggestion, take screen shot of all steps (from importing data to error message) and share it here. Hopefully, we can find a solution. 

Anonymous
Not applicable

Thanks, so basically, I have this survey value. Then running just the dataset as below, still getting the same error as indicated also as below. PS. im using 3.8 python, powerbi desktop, and a laptop company.

 
 

PBIthon.pngPBIthon_2.png

Icey
Community Support
Community Support

Hi @pouyanebrahimi ,

When I first try to reproduce your problem, it works well. However, after I changed the Privacy levels of Python and the data source file, the same issue appeared.

python'.PNG

 

Then, I tried these steps and it works well now.

1. Clear permissions of Python and the data source file.

python44.PNG

python4.PNG

2. Continue what you said.

python1.PNGpython2.PNGpython3.PNG

If the issue is still there, please let me know.

 

Best Regards,

Icey

 

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

 

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!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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.