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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

0

Power BI Service | Refreshing a dataset that uses a Python script fails

I have a Power BI report that pulls a csv file from a SharePoint site and then I use Python to transform the queried file using pandas library. On my desktop everythin works perfect. However, when I publish my report to the service and try to refresh the dataset either Manually or by scheduling. Refresh fails with the following error, "Scheduled refresh is disabled because at least one data source is missing credentials. To start the refresh again, go to this dataset's settings page and enter credentials for all data sources. Then reactivate scheduled refresh."

I even tried to use only python to generat a very simple dataframe from a blank query to narrow down the problem, the same issue happens again. I used this single line of code : df = pd.DataFrame({'col1':[1,2,3],'col2':[4,5,6],'col3':[7,8,9] })

The limitations of using a python script in the service isn't clear in the documentation. It only says "In just a few steps, you can run Python scripts and create a data model. From this model, you can create reports and share them on the Power BI service."

Status: Delivered

Hi @mnabil_cee ,

 

Totally agree with @klinejordan , please try using the personal gateway to see if it solves your problem.

 

Best Regards,
Community Support Team _ Caitlyn

Comments
klinejordan
Advocate II

See the limitations about python scripts refreshing in the service here: https://docs.microsoft.com/en-us/power-bi/connect-data/desktop-python-in-query-editor#creating-visua...

 

You need to install a Personal gateway and have python installed on that machine as well. 

mnabil_cee
Regular Visitor

Hi klinejordan,
Thank you, but this is not my case. The gateway is needed in the example in the link because the python was used with a file located on the local machine. However, in my case I have no local files in my dataset.

klinejordan
Advocate II

Not sure about that, I think you need a Personal Gateway regardless of what you're doing in python because the service needs a python runtime location to do the processing. But I could be wrong. 

v-xiaoyan-msft
Community Support
Status changed to: Delivered

Hi @mnabil_cee ,

 

Totally agree with @klinejordan , please try using the personal gateway to see if it solves your problem.

 

Best Regards,
Community Support Team _ Caitlyn

slru
New Member

I have a similar problem.  If I install the personal gateway and publish, will the other users be able to access and interact with the report/dashboard ? Do they need to do anything else on their side to get access? They are just consumers of the report and not developers.

 

If this is not possible with Power BI, do you know of other products that provide this feature? Thanks.