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.

Python personal gateway credentials

I'm currently trying to schedule a refresh for a Power BI report which uses python to transform the loaded data.

 

I can get the python script to run on my local machine in powerbi desktop, but when I publish it and attempt to schedule the refresh, I get an error concerning invalid credentials (Your data source can't be refreshed because the credentials are invalid. Please update your credentials and try again.). The other data sources connect fine through the personal gateway. When I click on 'Edit Credentials' for Python, I get the following specifics:

 

 

 

Failed to update data source credentials: ADO.NET: Python script error. Traceback (most recent call last): File "PythonScriptWrapper.PY", line 2, in <module> import os, pandas, matplotlib File "C:\ProgramData\Anaconda3\lib\site-packages\pandas\__init__.py", line 19, in <module> "Missing required dependencies {0}".format(missing_dependencies)) ImportError: Missing required dependencies ['numpy']

 

 

 

Activity ID:177ce143-63b1-422a-8852-ca1bef96a846
Request ID:9f20ee17-91cb-ab92-75d9-7688929f6157
Status code:400
Time:Fri Feb 28 2020 11:07:32 GMT+0000 (Greenwich Mean Time)
Service version:13.0.12439.190
Client version:2002.3.018
Cluster URI:https://wabi-north-europe-redirect.analysis.windows.net/

 

 

 

 

I can't see any way to select the python installation to run the script with, but all of my local environments should be able to run the script (notably, they all have numpy installed)

 

Thanks in advance for your help.

George Kinnell (Altius)

Status: New
Comments
tanuki
Frequent Visitor

Same issue. Any updates?

YOV
Helper II
Helper II

Anyone managed to find a solution?
We updated Python to 3.8 and now getting the same error. No way of specifying credentials for Python.

Thanks

Richard917
Regular Visitor

I am having same issue.  Any solutions?

declercqd
New Member

I have the same issue. A solution would be welcome

fededeleon
New Member

same problem for me, any update? 

thanks

ArthurRaza
New Member

I had the same problem but I have just solved it!

When I use Power BI Desktop I specify the Python Home Directory that I use (I created a virtual environment with anaconda with a specified Python version). It worked fine but when I publish the report I got an error with my Data Source Credentials!

 

I realized that with my Personal Gateway, Power BI Service is not using the same Python Home Directory that I specified! As I could not change the "extensionDataSourcePath" I decided to install the requirements (install or upgrade the modules) where it is needed and surprise it worked fine!

 

I hope it will help you guys!

freddy_acuna
Regular Visitor

@ArthurRaza can you share more details of the actions you used?

 

Which are the requirements? where can i find the details of the changes?

 

Thank you!