March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Objective: I'm trying to schedule a refresh of a dataset in powerbi.com. The data set has two data sources: a sql server connection and a python script.
Description of issue: PowerBI.com is prompting me to set the Data Source Credentials for both data sources. I am able to set the credentials with the sql server data source but not the python. I get an error that starts with "Failed to update data source credentials: ADO.NET: Python script error. C:\Users\richarda\Anaconda3\lib\site-packages\numpy\__init__.py:140: UserWarning: mkl-service ..." and continues on from there.
Possible source of issue: As you will see in the error message, it seems that power bi is trying to use the base Anaconda environment. The power bi desktop file is intentionally not using Anaconda. I initially tried using Anaconda but ran into multiple days of troubleshooting described in another post. I finally gave up and installed standard python 3.7.7 (non-anaconda). I pointed the desktop file to a new virtual environment I created from the non-anaconda instance. The python script runs successfully on the desktop in the intended virtual environment. I already worked through errors suggesting incorrect package versions in numpy and others and now have it running correctly. I know the desktop file is running in the correct virtual environment because the script uses a package that I don't have installed anywhere else.
Things I have done to troubleshoot (unsuccessfully):
Question: Why is powerbi.com looking to the anaconda environment when it is not referenced anywhere in the pbix file and not referenced anywhere in path variable?
The issue is similar to what is described in this post except in that case, the power bi was pointing to the old anaconda environment instead of the new anaconda environment. In my case, power bi is trying to use my old anaconda environment instead of the new non-anaconda environment. https://community.powerbi.com/t5/Service/Power-BI-python-script-env-change-worked-for-PowerBI-Deskto...
I thought about uninstalling anaconda, but I have many many virtual environments already set up there. I prefer to not have to go through the effort to set those all up again.
Any guidance is greatly appreciated
Hi @Richard917 ,
I found a similar THREAD on the internet Please check if it helps your question.
ADO.NET error trying to run Python Script in PowerBI
Unfortunately I'm not getting clear results at the moment. Looking forward to other experts in the forum to help you solve this problem.I will continue to try to solve this problem for you as well.
Hope it helps,
Community Support Team _ Caitlyn
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
What @Anonymous writes in the comment section in the below post has the exact same issue as me. No solution is provided there unfortunately
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
37 | |
22 | |
20 | |
10 | |
9 |
User | Count |
---|---|
59 | |
56 | |
22 | |
14 | |
12 |