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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Wendeley-North
Resolver I
Resolver I

PowerBI Scheduled Refresh Error - Failed to Update Data Source Credentials (Python)

Hi, trying to set up a scheduled refresh for my dataset, and running into the following issue when I try to update my credentials for the Python script that my report is using as a datasource:

Wendeley-North_0-1623397844718.png

I've attempted solutions that involved adding Path environment variables, but to no avail. I'm faily certain it has nothing to do with packages since the data refresh process works on PowerBI Desktop. Would appreciate any help. 

For what it's worth:

  1. The python script runs fine in the IDE.
  2. The PowerBI file runs fine on PowerBI desktop.
  3. Using an Acaconda installation.
5 REPLIES 5
Wendeley-North
Resolver I
Resolver I

Bump

Hi @Wendeley-North ,

 

Refer if these can help:

 

https://community.powerbi.com/t5/Custom-Visuals-Development/Python-Integration-Error/td-p/677350 

https://community.powerbi.com/t5/Desktop/Microsoft-PowerBI-Scripting-Python-Exceptions/td-p/850714 

https://community.powerbi.com/t5/Desktop/Power-BI-Python-with-Anaconda-missing-dependency/td-p/66510... 

https://stackoverflow.com/questions/64478324/how-can-i-use-numpy-1-18-5-for-python3-8-with-anaconda 

 

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.

Best Regards,
Winniz

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

Hi Winniz,

Thanks for the links - I'm in the midst of trying some of them, but the rest of the solutions have not worked.

Notably, these people have issues running Python scripts on PowerBI Desktop - which I do not have. My scripts run fine in PowerBI Desktop, but run into credential issues when attempting to refresh the dataset on the PowerBI service.

I've reached out to the help desk since I have a Pro subscription, but they seem less than useful at the moment. 

I believe that the detailed error information has been included in my initial post, and the result I expect is for refreshing to work on the PowerBI service, noting that I already have the personal gateway installed.

Many thanks.

ibarrau
Super User
Super User

Hi. The problem here is that there is a limitation in the standard/enterprise gateway. You can't handle Python or R with that gateway. You must use the "Personal" mode of the gateway to refresh a model using Python scripts. That gateway won't ask for credentials.

If that is set and you continue having errors, be sure that your developer environment is almost the same as the gateway environment (python version, libraries, packages, etc). You can always try refresh PBI Desktop in the same VM of the gateway to check for errors.

I hope that helps,


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

Happy to help!

LaDataWeb Blog

Hi, I am currently using the personal mode of the gateway, as far as I can tell - is there anything in the error message that indicates otherwise? And yes, I've been able to refresh the report in on the PBI Desktop, but not in the web service. 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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