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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
JeremyLeee
Helper I
Helper I

Power BI python script error after December update

Hi all,

All of my steps running python script in query editor stopped working after December's update, they all worked perfectly fine several days before.

 

The error code is:

DataSource.Error: ADO.NET: A problem occurred while processing your Python script.
Here are the technical details: The file or directory is corrupted and unreadable
Details:
    DataSourceKind=Python
    DataSourcePath=Python
    Message=A problem occurred while processing your Python script.
Here are the technical details: The file or directory is corrupted and unreadable
    ErrorCode=-2147467259
    ExceptionType=Microsoft.PowerBI.Scripting.Python.Exceptions.PythonUnexpectedException

 

My version is: Version: 2.76.5678.782 64-bit (December 2019)

 

Thanks

 

1 ACCEPTED SOLUTION

@edhans @Icey 

Thanks for your help, I did some trouble shooting and found somehow Python 3.7.3 (Mar 25, 2019 Version) won't work with the current verision of Power BI for me. I tried to change my python directory in Power BI to the latest version - Python 3.8.1 and it worked.

View solution in original post

11 REPLIES 11
apods1979
Helper I
Helper I

C:\Users\YouUSER\Anaconda3
C:\Users\YouUSER\Anaconda3\Library\mingw-w64\bin
C:\Users\YouUSER\Anaconda3\Scripts
C:\Users\YouUSER\Anaconda3\Library\bin

Icey
Community Support
Community Support

Hi @JeremyLeee ,

In my side, it works well.

python11.PNG

Based on your error message,

Here are the technical details: The file or directory is corrupted and unreadable

Please check if the data source has been moved or damaged. And try to re-edit the permission.

permission.PNG

 

If the issue is still there, what about using a previous version of Power BI Desktop?

 

Best Regards,

Icey

 

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

@Icey

Hi I used python scripts to do some complex data transformation in query editor, it may not be the same problem as python visuals.

I checked several reports and the same error happened to all of our data sources, including API, sharepoint files and local files. I don't think there's a possibility that all different sources were moved or damaged at the same time. 

I did re-edit the permission, but unfortunately it didn't work. Actually I did see this window starting from November's update:

Annotation 2019-12-20 133810.png

not sure why this appeared. but it didn't give me an error after clicking ignore at that time.

Would you be able to provide a Power BI version 2 months ago? 

Thanks again

Hi @JeremyLeee ,

You can get previous versions of Power BI here: https://chocolatey.org/packages/PowerBI/2.70.5494.761#versionhistory.

 

Best Regards,

Icey

 

edhans
Super User
Super User

Try to rebuild the connection by starting fresh. It may be something changed and the old code needs to be replaced new code.

 

If that doesn't work, post the issue in the Issues forum and tag it as a bug. The team more likely to catch that report vs one in here, if it is truly a bug introduced in the Dec 2019 update.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

Hi @edhans ,

What do you mean by rebuidling the connection? I tried to redo the Data source settings--> Edit permissions but can't fix the problem.

 

Thanks

I mean build a new connection as if starting from scratch. If that works, you should be able to paste the rest of the scripts into the new connection. This is just to test if Power BI flat broke something or something changed and new queries work fine, but older ones may not.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

@edhans Then that will be way too much work to rebuild every reports

Wasn't asking you to rebuild the reports. Was asking you to redo ONE set of data to do some trouble shooting to see if it is outright broken, or if the old didn't convert right with the new desktop build.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

@edhans @Icey 

Thanks for your help, I did some trouble shooting and found somehow Python 3.7.3 (Mar 25, 2019 Version) won't work with the current verision of Power BI for me. I tried to change my python directory in Power BI to the latest version - Python 3.8.1 and it worked.

Hi @JeremyLeee ,

Glad to hear that. Please accept your reply as a solution so that people who may have the same question can get the solution directly.

 

Best Regards,

Icey

Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

July Newsletter

Fabric Community Update - July 2024

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