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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.